/* styles.css */
@import url('./global.css');

body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #1a1a1a;
    /* Dark theme background */
    color: #dcddde;
    /* Light text color */
    overflow: hidden;
}

/* Navbar Theme (Dark) */
.navbar {
    background-color: #1a1a1a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-link {
    color: #f7f3eb;
}

.nav-link:hover {
    color: #ffffff;
}

/* Homepage-specific styles */
#name {
    font-weight: 450;
    background: linear-gradient(90deg, #b0e3ec, #b0e3ec);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: underline;
    text-decoration-color: #b0e3ec;
    text-decoration-thickness: 1px;
}

#curr {
    text-decoration: underline;
    text-decoration-color: #b0e3ec;
    text-decoration-thickness: 1px;
}

#content {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    margin-bottom: 4rem;
    max-width: 800px;
    width: 90%;
    text-align: center;
    line-height: 1.8;
    /* Increased vertical spacing (was 1 originally) */
    margin-top: 4rem;
    color: rgba(255, 255, 255, 0.8);
    /* Translucent effect restored */
}

#automata-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    /* Changed to 0 to be behind content which is usually z-index 1 or higher */
    /* Blur removed as requested */
    opacity: 0.5;
}

#directories {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.directory {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #dcddde;
    background: transparent;
    transition: transform 0.2s;
}

.directory:hover {
    transform: scale(1.05);
}

.directory img {
    width: 64px;
    height: 64px;
    margin-bottom: 0.5rem;
}

.directory-name {
    font-size: 1rem;
}

#social-section {
    position: fixed;
    bottom: 25px;
    right: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    z-index: 3;
}

#goku {
    height: 120px;
    width: auto;
    margin-bottom: -20px;
    margin-right: -30px;
}

#social-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    position: relative;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    transition: transform 0.2s;
    position: relative;
}

.social-link:hover {
    transform: scale(1.1);
}

.social-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: icon-glow 12.2s infinite;
    /* Matched to GIF duration */
}

/* Sequential delays for icons */
#social-links a:nth-child(1) img {
    animation-delay: 0.1s;
}

#social-links a:nth-child(2) img {
    animation-delay: 0.2s;
}

#social-links a:nth-child(3) img {
    animation-delay: 0.3s;
}

/* Glow animation - timed to 7-8 second mark */
@keyframes icon-glow {

    0%,
    58% {
        /* No glow until 6.9 seconds  */
        filter: drop-shadow(0 0 0 rgba(0, 255, 255, 0));
    }

    60% {
        /* Start glowing at 7 seconds */
        filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.8));
    }

    70% {
        /* Peak glow */
        filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.9));
    }

    72% {
        filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.8));
    }

    76%,
    100% {
        /* Back to normal */
        filter: drop-shadow(0 0 0 rgba(0, 255, 255, 0));
    }
}


.audio-player-wrapper {
    position: fixed;
    bottom: 40px;
    left: 20px;
    z-index: 3;
}

.audio-player {
    background: transparent;
    border: 2px solid #dcddde;
    /* Updated for dark theme */
    border-radius: 50%;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
    width: 48px;
    height: 48px;
}

.audio-player:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.1);
    /* Adjusted for dark theme */
}

.audio-icon {
    width: 24px;
    height: 24px;
    stroke: #dcddde;
    /* Updated for dark theme */
}

/* Audio wave animation */
@keyframes wave {
    0% {
        transform: scaleY(0.5);
    }

    50% {
        transform: scaleY(1);
    }

    100% {
        transform: scaleY(0.5);
    }
}

.wave-container {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 24px;
}

.wave-bar {
    width: 2px;
    height: 16px;
    background-color: #dcddde;
    /* Updated for dark theme */
    animation: wave 1s ease-in-out infinite;
}

.wave-bar:nth-child(2) {
    animation-delay: 0.1s;
}

.wave-bar:nth-child(3) {
    animation-delay: 0.2s;
}

.wave-bar:nth-child(4) {
    animation-delay: 0.3s;
}


/* Responsive Design for Tablets (max-width: 768px) */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        /* Allow scrolling on smaller screens */
    }

    #content {
        font-size: 1.5rem;
        margin-top: 2rem;
        margin-bottom: 2rem;
        width: 95%;
    }

    #directories {
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 1.5rem;
        padding-bottom: 100px;
        /* Add padding to prevent overlap with social section */
    }

    .directory img {
        width: 48px;
        height: 48px;
    }

    .directory-name {
        font-size: 0.9rem;
    }

    #social-section {
        position: fixed;
        bottom: 15px;
        right: 15px;
        flex-direction: row;
        /* Keep horizontal layout */
        align-items: center;
        gap: 1rem;
        /* Space between Goku and icons */
    }

    #goku {
        height: 80px;
        width: auto;
        margin-bottom: 0;
        /* Reset margins to align properly */
        margin-right: 0;
        order: -1;
        /* Ensure Goku stays left of social links */
    }

    #social-links {
        display: flex;
        gap: 1rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .audio-player-wrapper {
        bottom: 15px;
        left: 15px;
    }

    .audio-player {
        width: 40px;
        height: 40px;
        padding: 10px;
    }

    .audio-icon {
        width: 20px;
        height: 20px;
    }

    .wave-container {
        height: 20px;
    }

    .wave-bar {
        height: 12px;
    }
}

/* Responsive Design for Phones (max-width: 480px) */
@media (max-width: 480px) {
    #content {
        font-size: 1.2rem;
        line-height: 1.6;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    #directories {
        gap: 1rem;
        padding-bottom: 80px;
        /* Adjusted padding for smaller screens */
    }

    .directory img {
        width: 40px;
        height: 40px;
    }

    .directory-name {
        font-size: 0.8rem;
    }

    #social-section {
        bottom: 10px;
        right: 10px;
        flex-direction: row;
        /* Keep horizontal layout */
        gap: 0.8rem;
    }

    #goku {
        height: 60px;
        width: auto;
        margin-bottom: 0;
        margin-right: 0;
        order: -1;
        /* Ensure Goku stays left of social links */
    }

    #social-links {
        gap: 0.8rem;
    }

    .social-link {
        width: 35px;
        height: 35px;
    }

    .audio-player-wrapper {
        bottom: 10px;
        left: 10px;
    }

    .audio-player {
        width: 36px;
        height: 36px;
        padding: 8px;
    }

    .audio-icon {
        width: 18px;
        height: 18px;
    }

    .wave-container {
        height: 18px;
    }

    .wave-bar {
        height: 10px;
    }
}