:root {
    --primary-purple: #8A2BE2;
    --dark-purple: #4B0082;
    --black: #121212;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--black);
    color: white;
}

.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: white;
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(74, 0, 130, 0.1) 0%, rgba(138, 43, 226, 0.1) 100%);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    position: relative;
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
                -0.025em -0.05em 0 rgba(0, 255, 0, 0.75),
                0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    animation: glitch 500ms infinite;
}

.logo::before,
.logo::after {
    content: 'Byte';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip: rect(0, 900px, 0, 0);
}

.logo::before {
    text-shadow: 1px 0 #5865F2;
    animation: glitch-effect 3s infinite linear alternate-reverse;
}

.logo::after {
    text-shadow: -1px 0 #ff2459;
    animation: glitch-effect 2s infinite linear alternate-reverse;
}

@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
                    -0.025em -0.05em 0 rgba(0, 255, 0, 0.75),
                    0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    }
    14% {
        text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
                    -0.025em -0.05em 0 rgba(0, 255, 0, 0.75),
                    0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    }
    15% {
        text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
                    0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
                    -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    49% {
        text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
                    0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
                    -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    50% {
        text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75),
                    0.05em 0 0 rgba(0, 255, 0, 0.75),
                    0 -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    99% {
        text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75),
                    0.05em 0 0 rgba(0, 255, 0, 0.75),
                    0 -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    100% {
        text-shadow: -0.025em 0 0 rgba(255, 0, 0, 0.75),
                    -0.025em -0.025em 0 rgba(0, 255, 0, 0.75),
                    -0.025em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
}

@keyframes glitch-effect {
    0% {
        clip: rect(76px, 9999px, 87px, 0);
    }
    5% {
        clip: rect(35px, 9999px, 9px, 0);
    }
    10% {
        clip: rect(85px, 9999px, 98px, 0);
    }
    15% {
        clip: rect(91px, 9999px, 98px, 0);
    }
    20% {
        clip: rect(54px, 9999px, 76px, 0);
    }
    25% {
        clip: rect(35px, 9999px, 46px, 0);
    }
    30% {
        clip: rect(57px, 9999px, 98px, 0);
    }
    35% {
        clip: rect(61px, 9999px, 67px, 0);
    }
    40% {
        clip: rect(89px, 9999px, 98px, 0);
    }
    45% {
        clip: rect(4px, 9999px, 37px, 0);
    }
    50% {
        clip: rect(82px, 9999px, 97px, 0);
    }
    55% {
        clip: rect(23px, 9999px, 45px, 0);
    }
    60% {
        clip: rect(54px, 9999px, 89px, 0);
    }
    65% {
        clip: rect(45px, 9999px, 78px, 0);
    }
    70% {
        clip: rect(32px, 9999px, 54px, 0);
    }
    75% {
        clip: rect(67px, 9999px, 98px, 0);
    }
    80% {
        clip: rect(32px, 9999px, 43px, 0);
    }
    85% {
        clip: rect(12px, 9999px, 46px, 0);
    }
    90% {
        clip: rect(34px, 9999px, 76px, 0);
    }
    95% {
        clip: rect(67px, 9999px, 98px, 0);
    }
    100% {
        clip: rect(43px, 9999px, 67px, 0);
    }
}

.discord-btn {
    background: #5865F2;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.discord-btn:hover {
    transform: translateY(-2px);
    background-color: var(--dark-purple);
}

.hero-content {
    max-width: 800px;
    margin: 8rem auto 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    gap: 2rem;
}

h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 0 10px rgba(88, 101, 242, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s;
    color: #ffffff99;
}

.cta-buttons {
    animation: fadeInUp 1s ease 0.4s;
    display: flex;
    gap: 1rem;
}

.primary-btn {
    background: #5865F2;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.2s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    background-color: var(--dark-purple);
}

.features {
    padding: 4rem 2rem;
    background: #f5f5f5;
    color: #1a1a1a;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1a1a1a;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    color: #333;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.feature-card p {
    color: #666;
    line-height: 1.5;
}

footer {
    text-align: center;
    padding: 2rem;
    background: #1a1a1a;
    color: white;
}

/* Audio Controls Styling */
.audio-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.audio-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 15px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.audio-btn:hover {
    transform: scale(1.1);
}

.volume-control {
    width: 100px;
}

#volume-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

#volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Visualizer styles */
.visualizer-text {
    display: inline-block;
    position: relative;
    color: white !important;
    background: none !important;
    -webkit-text-fill-color: white !important;
    padding: 10px 20px;
}

/* Tracing effect container */
.visualizer-text::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid transparent;
    border-radius: 10px;
    animation: traceBorder 4s linear infinite;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(88, 101, 242, 0.2) 25%, 
        rgba(88, 101, 242, 0.8) 50%,
        rgba(88, 101, 242, 0.2) 75%,
        transparent 100%
    );
    background-size: 200% 100%;
    filter: blur(3px);
    z-index: -1;
}

/* Glow effect */
.visualizer-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at center,
        rgba(88, 101, 242, 0.2) 0%,
        transparent 70%
    );
    filter: blur(15px);
    z-index: -2;
    opacity: 0.5;
    animation: pulseGlow 2s ease-in-out infinite;
}

.letter {
    display: inline-block;
    transform-origin: bottom;
    transition: transform 0.1s ease-out;
    color: white !important;
    text-shadow: 0 0 10px rgba(88, 101, 242, 0.7),
                 0 0 20px rgba(88, 101, 242, 0.5),
                 0 0 30px rgba(88, 101, 242, 0.3);
    position: relative;
    z-index: 1;
}

/* Tracing animation */
@keyframes traceBorder {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Glow pulse animation */
@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Letter hover effect */
.letter:hover {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(88, 101, 242, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(88, 101, 242, 0.8);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hero-content {
        margin-top: 4rem;
    }

    h1 {
        font-size: 3rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 1rem;
    }

    nav {
        padding: 1rem;
    }
}