/*
    TCTE Countdown  Copyright (C) 2025  mykevinjjw

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/
/* General Setup */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans TC', sans-serif;
    overflow: hidden;
}

body {
    background: linear-gradient(250deg, #3a7bd5, #3a6073);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    text-align: center;
}

/* Main Container */
.container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Glassmorphism Content Box */
.content {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 40px 60px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
    z-index: 1;
    transition: all 0.3s ease;
    min-width: 60vw;
}

/* Typography */
#title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #f0f0f0;
    transition: font-size 0.3s ease;
}

/* Countdown Container */
.countdown-container {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 20px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-number {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(3rem, 12vw, 6rem);
    font-weight: 700;
    line-height: 1;
}

.countdown-label {
    font-size: 1.2rem;
    font-weight: 400;
    margin-top: 5px;
}

/* Final Text Styling */
.final-text {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 2.5rem;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
}

.exam-date-text {
    font-size: 1.5rem;
    margin-top: 25px;
    color: #ffffff;
    font-weight: 700;
    transition: font-size 0.3s ease;
}

/* Bubble Animation */
.bubble {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    z-index: 0;
}

.bubble li {
    position: absolute;
    list-style: none;
    display: block;
    background: rgba(255, 255, 255, 0.15);
    bottom: -150px;
    animation: bubble-ani 25s linear infinite;
    border-radius: 50%;
}

@keyframes bubble-ani {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-120vh);
        opacity: 0;
    }
}

.bubble li:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-delay: 0s;
}

.bubble li:nth-child(2) {
    width: 20px;
    height: 20px;
    left: 20%;
    animation-delay: 2s;
    animation-duration: 12s;
}

.bubble li:nth-child(3) {
    width: 50px;
    height: 50px;
    left: 25%;
    animation-delay: 4s;
}

.bubble li:nth-child(4) {
    width: 60px;
    height: 60px;
    left: 40%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.bubble li:nth-child(5) {
    width: 20px;
    height: 20px;
    left: 55%;
    animation-delay: 0s;
}

.bubble li:nth-child(6) {
    width: 110px;
    height: 110px;
    left: 65%;
    animation-delay: 0s;
}

.bubble li:nth-child(7) {
    width: 40px;
    height: 40px;
    left: 80%;
    animation-delay: 1s;
    animation-duration: 20s;
}

.bubble li:nth-child(8) {
    width: 30px;
    height: 30px;
    left: 90%;
    animation-delay: 3s;
}

/* Announcement Board */
.announcement-board {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    position: fixed;
    bottom: 50px;
    /* Moved up */
    right: 20px;
    width: 300px;
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    z-index: 100;
    text-align: left;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.announcement-board.hidden {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}

.announcement-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #ffffff;
}

.announcement-text {
    font-size: 0.9rem;
    margin: 0 0 15px 0;
    color: #e0e0e0;
}

.author-signature {
    font-size: 0.9rem;
    font-weight: bold;
    text-align: right;
    color: #f0f0f0;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content {
        padding: 30px 25px;
        width: 85%;
        min-width: 85vw;
    }

    #title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .countdown-container {
        gap: 10px;
    }

    .countdown-number {
        font-size: clamp(2rem, 10vw, 4rem);
    }

    .countdown-label {
        font-size: 0.8rem;
    }

    .final-text {
        font-size: 1.8rem;
    }

    .exam-date-text {
        font-size: 1rem;
        margin-top: 20px;
    }

    .announcement-board {
        width: 90%;
        max-width: 400px;
        bottom: 60px;
        left: 50%;
        transform: translateX(-50%) scale(0.9);
        /* Scale down */
        right: auto;
        background: rgba(0, 0, 0, 0.15);
        /* Lower opacity */
        border: 1px solid rgba(255, 255, 255, 0.05);
        /* Weaker border */
        padding: 15px;
        /* Smaller padding */
        backdrop-filter: blur(3px);
        /* Weaker blur */
    }
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 5px 0;
    background: transparent;
    /* Transparent background */
    backdrop-filter: none;
    /* Removed blur */
    color: rgba(255, 255, 255, 0.4);
    /* Less prominent color */
    font-size: 0.7rem;
    /* Smaller font */
    z-index: 50;
    pointer-events: none;
    /* Allow clicking through if needed, though links need pointer-events: auto */
}

.footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
    pointer-events: auto;
    /* Re-enable clicks for links */
}



.footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* GitHub Icon */
.github-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    z-index: 1000;
    transition: transform 0.3s ease;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.github-icon:hover {
    transform: scale(1.1);
}

.github-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}