* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

body {
    background: linear-gradient(135deg, #1e0533, #0a0a23, #1a3c34);
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1; /* Increased to ensure visibility above section backgrounds */
}

.particle {
    position: absolute;
    width: 15px; /* Increased for better visibility */
    height: 15px;
    background: radial-gradient(circle, #ff00ff, #00ff00); /* Changed to green for better contrast */
    border-radius: 50%;
    animation: float 12s infinite ease-in-out, glow 3s infinite alternate;
}

.particle:nth-child(1) { top: calc(100% * var(--rand-y)); left: calc(100% * var(--rand-x)); animation-delay: 0s; }
.particle:nth-child(2) { top: calc(100% * var(--rand-y)); left: calc(100% * var(--rand-x)); animation-delay: 1.5s; }
.particle:nth-child(3) { top: calc(100% * var(--rand-y)); left: calc(100% * var(--rand-x)); animation-delay: 3s; }
.particle:nth-child(4) { top: calc(100% * var(--rand-y)); left: calc(100% * var(--rand-x)); animation-delay: 4.5s; }
.particle:nth-child(5) { top: calc(100% * var(--rand-y)); left: calc(100% * var(--rand-x)); animation-delay: 6s; }
.particle:nth-child(6) { top: calc(100% * var(--rand-y)); left: calc(100% * var(--rand-x)); animation-delay: 7.5s; }
.particle:nth-child(7) { top: calc(100% * var(--rand-y)); left: calc(100% * var(--rand-x)); animation-delay: 9s; }
.particle:nth-child(8) { top: calc(100% * var(--rand-y)); left: calc(100% * var(--rand-x)); animation-delay: 10.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-25vh) scale(1.2); }
}

@keyframes glow {
    0% { opacity: 0.7; box-shadow: 0 0 5px #ff00ff; } /* Increased minimum opacity */
    100% { opacity: 1; box-shadow: 0 0 20px #00ff00; } /* Increased glow intensity */
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 5px rgba(255, 235, 59, 0.5); }
    50% { transform: scale(1.02); box-shadow: 0 0 15px rgba(255, 235, 59, 0.8); }
    100% { transform: scale(1); box-shadow: 0 0 5px rgba(255, 235, 59, 0.5); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes snowflakeFall {
    0% { opacity: 1; transform: translateY(0) rotate(0deg); }
    100% { opacity: 0; transform: translateY(50px) rotate(360deg); }
}

.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #ff007a, #00d4ff);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.snowflake-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.snowflake {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    animation: snowflakeFall 2s linear forwards;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(90deg, #ff007a, #ffaa00);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 1rem 0;
}

nav ul li {
    margin: 0 1.2rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

nav ul li a:hover {
    color: #ffeb3b;
    text-shadow: 0 0 10px #ffeb3b;
}

nav ul li select {
    background: #ffaa00;
    color: #fff;
    border: none;
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

nav ul li select:hover {
    background: #ff6f00;
}

section {
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 5, 51, 0.7);
    z-index: 0;
}

section > * {
    position: relative;
    z-index: 1;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #ff007a, #ffaa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #ffeb3b;
    text-shadow: 0 0 10px #ffeb3b;
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #00d4ff, #ff007a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: #e0e0e0;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(45deg, #ff007a, #ffaa00);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 0, 122, 0.5);
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.8);
}

.gallery-grid, .services-grid, .testimonials-grid, .skills-grid, .projects-grid, .journey-grid, .tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item, .service-card, .testimonial-card, .skill-card, .project-card, .journey-item, .tool-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 1.5rem;
    border-radius: 15px;
    transition: transform 0.3s ease, background 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.gallery-item::before, .service-card::before, .testimonial-card::before, .skill-card::before, .project-card::before, .journey-item::before, .tool-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 5, 51, 0.7);
    z-index: 0;
}

.gallery-item > *, .service-card > *, .testimonial-card > *, .skill-card > *, .project-card > *, .journey-item > *, .tool-item > * {
    position: relative;
    z-index: 1;
}

.gallery-item:hover, .service-card:hover, .testimonial-card:hover, .skill-card:hover, .project-card:hover, .journey-item:hover, .tool-item:hover {
    transform: translateY(-8px);
    background: linear-gradient(45deg, rgba(255, 0, 122, 0.3), rgba(255, 170, 0, 0.3));
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.gallery-item img, .project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 2px solid #00d4ff;
}

.testimonial-card h4 {
    margin-top: 1rem;
    color: #ffeb3b;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.about-content img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ff007a;
    box-shadow: 0 0 10px #ff007a;
}

.tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.tool-item {
    padding: 1rem;
    background: linear-gradient(45deg, #00d4ff, #ff007a);
    color: #fff;
    font-weight: bold;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.tool-item:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px #00d4ff;
}

.contact-info p {
    margin: 0.5rem 0;
    color: #e0e0e0;
}

.social-links {
    margin-top: 2rem;
}

.social-links a {
    margin: 0 1.5rem;
    color: #ffeb3b;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.social-links a:hover {
    color: #00d4ff;
    text-shadow: 0 0 10px #00d4ff;
}

footer {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(90deg, #ff007a, #ffaa00);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

footer p {
    font-size: 0.9rem;
    color: #fff;
}

/* Tools Section Styling */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 1.5rem;
    border-radius: 15px;
    transition: transform 0.3s ease, background 0.3s ease;
    border: 1px solid #00d4ff;
    animation: pulse 2s infinite ease-in-out;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 5, 51, 0.7);
    z-index: 0;
}

.tool-card > * {
    position: relative;
    z-index: 1;
}

.tool-card:hover {
    transform: translateY(-8px);
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.3), rgba(255, 0, 122, 0.3));
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    animation-play-state: paused;
}

.tool-card h3 {
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffeb3b, #ff007a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.tool-card h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffeb3b;
    transition: width 0.3s ease;
}

.tool-card:hover h3::after {
    width: 100%;
}

.calculator input, .weather-app input, .todo-app input, .currency-converter input, .timer-app input, .unit-converter input, .random-number-generator input, .bmi-calculator input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 2px solid #ffaa00;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.calculator input:focus, .weather-app input:focus, .todo-app input:focus, .currency-converter input:focus, .timer-app input:focus, .unit-converter input:focus, .random-number-generator input:focus, .bmi-calculator input:focus {
    border-color: #ffeb3b;
    outline: none;
    box-shadow: 0 0 10px #ffeb3b;
}

.calculator input[readonly] {
    background: rgba(255, 255, 255, 0.3);
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.calc-btn {
    padding: 0.8rem;
    background: linear-gradient(45deg, #ff007a, #ffaa00);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.calc-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.calc-btn:hover::before {
    left: 100%;
}

.calc-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px #ffaa00;
}

.weather-app button, .todo-app button, .currency-converter button, .timer-controls button, .countdown-controls button, .unit-converter button, .random-number-generator button, .bmi-calculator button {
    padding: 0.5rem 1rem;
    background: linear-gradient(45deg, #00d4ff, #ff007a);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin: 0.5rem 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.weather-app button::before, .todo-app button::before, .currency-converter button::before, .timer-controls button::before, .countdown-controls button::before, .unit-converter button::before, .random-number-generator button::before, .bmi-calculator button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.weather-app button:hover::before, .todo-app button:hover::before, .currency-converter button:hover::before, .timer-controls button:hover::before, .countdown-controls button:hover::before, .unit-converter button:hover::before, .random-number-generator button:hover::before, .bmi-calculator button:hover::before {
    left: 100%;
}

.weather-app button:hover, .todo-app button:hover, .currency-converter button:hover, .timer-controls button:hover, .countdown-controls button:hover, .unit-converter button:hover, .random-number-generator button:hover, .bmi-calculator button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px #00d4ff;
}

.weather-display, .currency-result, .unit-result, .number-result, .color-values, .bmi-result {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(45deg, rgba(255, 235, 59, 0.2), rgba(255, 0, 122, 0.2));
    border-radius: 5px;
    border: 1px solid #ffeb3b;
    animation: fadeIn 0.5s ease-out;
}

.todo-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 0.5rem;
    border-radius: 5px;
    border: 1px solid #00d4ff;
    animation: fadeIn 0.3s ease-out;
}

.delete-btn {
    background: linear-gradient(45deg, #ff4444, #ff0000);
    color: #fff;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.delete-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #cc0000, #ff0000);
}

.currency-converter select, .unit-converter select {
    padding: 0.5rem;
    margin: 0.5rem 0;
    background: #ffaa00;
    color: #fff;
    border: 2px solid #ff007a;
    border-radius: 5px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.currency-converter select:hover, .unit-converter select:hover {
    border-color: #ffeb3b;
    box-shadow: 0 0 10px #ffeb3b;
}

.timer-display {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.2), rgba(255, 0, 122, 0.2));
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #ffeb3b;
    transition: background 0.5s ease;
}

.timer-display.active {
    background: linear-gradient(45deg, rgba(255, 235, 59, 0.3), rgba(255, 0, 122, 0.3));
}

.color-picker {
    text-align: center;
}

.color-display {
    margin: 1rem 0;
    border-radius: 5px;
    border: 2px solid #ffeb3b;
    transition: transform 0.3s ease;
}

.color-display.active {
    transform: scale(1.02);
    box-shadow: 0 0 15px #ffeb3b;
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .calc-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}