@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;700&family=Source+Code+Pro:wght@400;600&display=swap');

:root {
    --bg-color: #0D1117;
    /* GitHub dark mode style bg */
    --container-bg: rgba(18, 13, 36, 0.75); /* Darker transparent container with purple tint */
    --border-color: #d946ef; /* Brighter purple accent matching particle color */
    --text-color: #ffffff; /* Brighter white text */
    --accent-text-color: #e879f9; /* Lighter pink for accent text */
    --secondary-accent-color: #f0abfc; /* Very light pink for secondary elements */
    --dimmed-text-color: #d1d5db; /* Lighter gray text */
    --spotify-green: #1DB954;
    --spotify-green-hover: #1ed760;
}

body {
    font-family: 'Source Code Pro', monospace;
    /* Monospaced for coder feel */
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    overflow: hidden;
    position: relative;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.container {
    padding: 30px 40px;
    border-radius: 12px;
    background-color: var(--container-bg);
    box-shadow: 0 0 30px rgba(217, 70, 239, 0.3), 0 5px 15px rgba(0,0,0,0.3); /* Brighter shadow */
    border: 2px solid var(--border-color);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    max-width: 680px;
    width: 90%;
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin: 0 auto; /* Ensure container is centered */
}

.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(232, 121, 249, 0.1), transparent 70%);
    z-index: -1;
}

h1 {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 2.4em;
    color: var(--accent-text-color);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.title-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.title-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

p {
    font-size: 1em;
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--text-color);
}

p.subtitle {
    font-size: 0.9em;
    color: var(--dimmed-text-color);
    margin-top: -10px;
}

.countup-title {
    font-family: 'Roboto Mono', monospace;
    font-weight: 500;
    font-size: 1.4em;
    color: var(--text-color);
    margin-bottom: 10px;
    margin-top: 25px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(217, 70, 239, 0.5);
    text-align: center; /* Ensure title is centered */
}

.countdown-container {
    margin: 25px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
}

.countdown-unit {
    background-color: rgba(26, 16, 50, 0.6);
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid rgba(217, 70, 239, 0.5);
    min-width: 60px;
    width: 80px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.countdown-unit:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(217, 70, 239, 0.2);
    border-color: var(--border-color);
}

.countdown-unit span {
    display: block;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 2.2em;
    color: var(--accent-text-color);
    margin-bottom: 5px;
    text-shadow: 0 0 8px rgba(217, 70, 239, 0.4);
}

.countdown-unit .label {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.7em;
    color: var(--dimmed-text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* Milestones Badge in Main Container */
.milestones-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px auto;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(217, 70, 239, 0.15), rgba(232, 121, 249, 0.1));
    border: 1px solid rgba(217, 70, 239, 0.4);
    border-radius: 25px;
    max-width: 280px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.milestones-badge:hover {
    transform: translateY(-2px);
    border-color: var(--border-color);
    box-shadow: 0 6px 15px rgba(217, 70, 239, 0.2);
}

.milestones-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(232, 121, 249, 0.1), transparent 70%);
    z-index: -1;
}

.badge-icon {
    font-size: 1.5em;
    text-shadow: 0 0 10px rgba(217, 70, 239, 0.6);
    animation: badgeGlow 3s ease-in-out infinite alternate;
}

@keyframes badgeGlow {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.badge-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.badge-count {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 1.1em;
    color: var(--accent-text-color);
    text-shadow: 0 0 8px rgba(217, 70, 239, 0.4);
}

.badge-text {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.7em;
    color: var(--dimmed-text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Modern Compact Milestones Panel */
.milestones-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 85%;
    max-width: 600px;
    max-height: 75vh;
    background: linear-gradient(135deg, rgba(18, 13, 36, 0.95), rgba(26, 16, 50, 0.95));
    border: 2px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(217, 70, 239, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1001;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.milestones-panel.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.milestones-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid rgba(217, 70, 239, 0.3);
    background: linear-gradient(90deg, rgba(217, 70, 239, 0.1), transparent);
}

.milestones-panel-title {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 1.4em;
    color: var(--text-color);
    margin: 0;
    text-shadow: 0 0 15px rgba(217, 70, 239, 0.5);
}

.milestones-close-btn {
    background: none;
    border: none;
    color: var(--dimmed-text-color);
    font-size: 1.3em;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.milestones-close-btn:hover {
    background-color: rgba(217, 70, 239, 0.2);
    color: var(--text-color);
    transform: rotate(90deg);
}

.milestones-panel-content {
    padding: 20px 25px 25px;
    max-height: calc(75vh - 85px);
    overflow-y: auto;
}

.milestones-panel-content::-webkit-scrollbar {
    width: 6px;
}

.milestones-panel-content::-webkit-scrollbar-track {
    background: rgba(217, 70, 239, 0.1);
    border-radius: 3px;
}

.milestones-panel-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.milestones-panel .milestones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    width: 100%;
}

.milestones-panel .milestone {
    background-color: rgba(26, 16, 50, 0.7);
    border-radius: 12px;
    padding: 15px 12px;
    border: 1px solid rgba(217, 70, 239, 0.4);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.milestones-panel .milestone:hover {
    transform: translateY(-3px);
    border-color: var(--border-color);
}

.milestone.completed {
    border-color: var(--border-color);
    background-color: rgba(217, 70, 239, 0.1);
    box-shadow: 0 4px 12px rgba(217, 70, 239, 0.2);
    transform: scale(1.02);
}

.milestone.completed::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(232, 121, 249, 0.15), transparent 70%);
    z-index: -1;
}

.milestone-icon {
    font-size: 1.8em;
    margin-bottom: 8px;
    display: block;
}

.milestone.completed .milestone-icon {
    color: var(--accent-text-color);
    text-shadow: 0 0 8px rgba(217, 70, 239, 0.4);
}

.milestone:not(.completed) .milestone-icon {
    color: var(--dimmed-text-color);
}

.milestone-text {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.75em;
    color: var(--dimmed-text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.milestone.completed .milestone-text {
    color: var(--text-color);
    font-weight: 600;
}

.milestone-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--border-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.milestone.completed .milestone-badge {
    opacity: 1;
    transform: scale(1);
}

@keyframes milestoneComplete {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 8px 20px rgba(217, 70, 239, 0.4); }
    100% { transform: scale(1.02); }
}

.spotify-player {
    background-color: rgba(18, 13, 36, 0.65);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    padding: 15px;
    margin: 25px auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
}

.spotify-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 215, 96, 0.05), transparent);
    z-index: 0;
    border-radius: 8px;
}

.player-top {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.player-left {
    display: flex;
    align-items: center;
    position: relative;
}

.album-cover {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    transition: all 0.3s ease;
    cursor: pointer;
}

.song-info {
    flex: 1;
    text-align: left;
    padding-left: 0;
}

.song-title {
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    font-size: 1em;
    color: var(--text-color);
    margin-bottom: 5px;
}

.song-artist {
    font-size: 0.85em;
    color: var(--dimmed-text-color);
}

.progress-container {
    margin-top: 15px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.progress-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress-filled {
    height: 100%;
    background-color: #1DB954;
    border-radius: 2px;
    transition: width 0.1s ease;
}

.current-time {
    font-size: 0.7em;
    color: var(--dimmed-text-color);
    min-width: 35px;
    text-align: left;
}

.duration {
    font-size: 0.7em;
    color: var(--dimmed-text-color);
    min-width: 35px;
    text-align: right;
}

.playback-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.player-left:hover .playback-button {
    opacity: 1;
}

.player-left:hover .album-cover {
    filter: brightness(0.6);
}

.control-button {
    background: var(--spotify-green);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1em;
}

.control-button:hover {
    background: var(--spotify-green-hover);
    transform: scale(1.05);
}

.control-button:active {
    transform: scale(0.95);
}

.control-button i {
    pointer-events: none;
}

.control-button i.fa-play {
    margin-left: 2px;
}

#audio-player {
    display: none;
}

.social-links {
    margin: 25px auto;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.social-links a {
    color: var(--secondary-accent-color);
    text-decoration: none;
    margin: 0 15px;
    font-size: 1.8em;
    transition: all 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    color: var(--text-color);
    transform: scale(1.2);
    text-shadow: 0 0 10px rgba(217, 70, 239, 0.8);
}

.social-links .icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.social-links .username {
    margin-top: 15px;
    font-size: 1em;
    color: var(--accent-text-color);
    font-weight: 500;
    text-align: center;
}

.social-links .quote {
    margin: 10px auto 0;
    font-size: 0.9em;
    color: var(--dimmed-text-color);
    font-style: italic;
    max-width: 80%;
    text-align: center;
}

footer {
    margin: 25px auto 0;
    font-size: 0.8em;
    color: var(--dimmed-text-color);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    h1 { font-size: 1.8em; letter-spacing: 0.5px; }
    .title-section { gap: 10px; }
    .title-logo { width: 50px; height: 50px; }
    p { font-size: 0.85em; line-height: 1.6; margin-bottom: 15px; }
    p.subtitle { font-size: 0.75em; margin-top: -8px; margin-bottom: 15px; }
    .countup-title { font-size: 1.1em; margin-top: 20px; margin-bottom: 15px;}
    .container { padding: 20px 25px; }
    .countdown-container {
        flex-wrap: wrap;
        gap: 10px;
        margin: 20px auto;
        justify-content: center;
        padding: 0 10px;
    }
    .countdown-unit { padding: 8px 10px; min-width: 50px; flex-basis: calc(50% - 10px); }
    .countdown-unit span { font-size: 1.5em; }
    .countdown-unit .label { font-size: 0.55em; }
    .social-links .icon-container { gap: 20px; }
    .social-links a { font-size: 1.4em; margin: 0 5px; }
    .milestones-panel { 
        width: 90%; 
        max-width: 500px;
        max-height: 80vh; 
    }
    .milestones-panel .milestones-grid { 
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); 
        gap: 12px; 
    }
    .milestones-badge { 
        padding: 10px 16px; 
        max-width: 250px; 
        margin: 15px auto; 
    }
    .badge-count { font-size: 1em; }
    .badge-text { font-size: 0.65em; }
    footer { font-size: 0.75em; margin-top: 20px; }
    .spotify-player {
        width: calc(100% - 20px);
        margin: 25px auto;
        padding: 10px;
    }
}

@media (max-width: 420px) {
    h1 { font-size: 1.6em; }
    .title-section { gap: 8px; }
    .title-logo { width: 40px; height: 40px; }
    p { font-size: 0.8em; }
    p.subtitle { font-size: 0.7em; }
    .countup-title { font-size: 1em; margin-top: 15px; margin-bottom: 10px;}
    .container { padding: 15px 20px; }
    .countdown-container { gap: 8px; } 
    .countdown-unit { flex-basis: calc(50% - 8px); padding: 6px 8px; min-width: 45px; }
    .countdown-unit span { font-size: 1.3em; }
    .countdown-unit .label { font-size: 0.5em; }
    .social-links .icon-container { gap: 15px; }
    .social-links a { font-size: 1.3em; margin: 0 3px; }
    .milestones-panel { 
        width: 95%; 
        max-width: 450px;
        max-height: 85vh; 
    }
    .milestones-panel .milestones-grid { 
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); 
        gap: 10px; 
    }
    .milestones-badge { 
        padding: 8px 14px; 
        max-width: 220px; 
        margin: 12px auto; 
        gap: 10px; 
    }
    .badge-icon { font-size: 1.3em; }
    .badge-count { font-size: 0.9em; }
    .badge-text { font-size: 0.6em; }
    footer { font-size: 0.7em; }
    .spotify-player {
        width: calc(100% - 10px);
        margin: 20px auto;
        padding: 8px;
    }
}

@media (max-width: 350px) {
    h1 { font-size: 1.4em; }
    .title-section { 
        flex-direction: column; 
        gap: 10px; 
    }
    .title-logo { width: 45px; height: 45px; }
    .countup-title { font-size: 0.9em; }
    .countdown-unit { 
        flex-basis: 100%;
        margin-bottom: 8px;
    }
    .countdown-unit:last-child { margin-bottom: 0; }
    .countdown-container { gap: 0; }
    .milestones-panel { 
        width: 98%; 
        max-width: 380px;
        max-height: 90vh; 
    }
    .milestones-panel .milestones-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 8px; 
    }
    .milestones-panel-content { 
        padding: 15px 20px; 
    }
    .milestones-badge { 
        padding: 6px 12px; 
        max-width: 200px; 
        margin: 10px auto; 
        gap: 8px; 
        flex-direction: column;
        text-align: center;
    }
    .badge-icon { font-size: 1.2em; }
    .badge-count { font-size: 0.85em; }
    .badge-text { font-size: 0.55em; }
} 