@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

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

body {
    min-height: 100vh;
    background: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
    position: relative;
    overflow-x: hidden;
}

.confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    width: 300px;
}

.loading-text {
    font-size: 1.5rem;
    color: #000000;
    margin-bottom: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.progress-bar {
    width: 100%;
    height: 3px;
    background: #f0f0f0;
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #000000;
    transition: width 0.3s ease;
    border-radius: 20px;
    width: 0%;
}

/* Main Content */
.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    animation: slideUp 0.6s ease-out;
}

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

.header {
    text-align: center;
    margin-bottom: 5rem;
}

.main-title {
    font-size: 4rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
    font-family: 'Space Grotesk', sans-serif;
}

.subtitle {
    font-size: 1.125rem;
    color: #666666;
    font-weight: 400;
    letter-spacing: 0.05em;
    font-family: 'Space Grotesk', sans-serif;
}

/* Pinned Timer */
.pinned-timer {
    background: #000000;
    border-radius: 40px;
    padding: 4rem;
    margin-bottom: 4rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pinned-timer:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.timer-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.timer-title {
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.02em;
    font-family: 'Space Grotesk', sans-serif;
}

.pinned-badge {
    background: #ffffff;
    color: #000000;
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    font-family: 'Space Grotesk', sans-serif;
}

/* Countdown Display */
.countdown-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.countdown-display.large {
    gap: 2.5rem;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* Zoom Animation */
.digit-container {
    position: relative;
    overflow: visible;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.digit-container.large {
    width: 120px;
    height: 140px;
}

.digit-container.small {
    width: 70px;
    height: 80px;
}

.digit-display {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
    border-radius: 20px;
    font-weight: 700;
    font-size:70%
    font-family: 'Space Grotesk', sans-serif;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.digit-display.zoom {
    animation: zoomPulse 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoomPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

/* Pinned timer digits */
.pinned-timer .digit-display {
    background: #ffffff;
    color: #000000;
    font-size: 3.5rem;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Other timer digits */
.timer-card .digit-display {
    background: #000000;
    color: #ffffff;
    font-size: 1.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.countdown-label {
    font-weight: 500;
    letter-spacing: 0.15em;
    font-family: 'Space Grotesk', sans-serif;
}

.pinned-timer .countdown-label {
    color: #ffffff;
}

.timer-card .countdown-label {
    color: #000000;
}

.label-lg {
    font-size: 0.75rem;
}

.label-sm {
    font-size: 0.5rem;
}

.countdown-separator {
    font-size: 3rem;
    font-weight: 300;
    margin-top: -1.5rem;
    font-family: 'Space Grotesk', sans-serif;
}

.pinned-timer .countdown-separator {
    color: #ffffff;
}

.timer-card .countdown-separator {
    color: #000000;
    font-size: 1.5rem;
    margin-top: -1rem;
}

/* Exam Started */
.exam-started {
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.05em;
    font-family: 'Space Grotesk', sans-serif;
    animation: pulse 2s ease-in-out infinite;
}

.pinned-timer .exam-started {
    color: #ffffff;
    font-size: 2rem;
}

.timer-card .exam-started {
    color: #000000;
    font-size: 1.25rem;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Other Timers Section */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 0.1em;
    font-family: 'Space Grotesk', sans-serif;
}

.timer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.timer-card {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 30px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timer-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.timer-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.timer-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #000000;
    letter-spacing: 0.02em;
    font-family: 'Space Grotesk', sans-serif;
}

.pin-button {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Space Grotesk', sans-serif;
}

.pin-button:hover {
    background: #333333;
    transform: scale(1.05);
}

.pin-button:active {
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 2rem 1rem;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .header {
        margin-bottom: 3rem;
    }

    .pinned-timer {
        padding: 2rem 1.5rem;
        border-radius: 30px;
    }

    .timer-title {
        font-size: 1.5rem;
    }

    .digit-container.large {
        width: 80px;
        height: 90px;
    }

    .pinned-timer .digit-display {
        font-size: 2.5rem;
    }

    .countdown-display.large {
        gap: 1rem;
    }

    .countdown-separator {
        font-size: 2rem;
        margin-top: -1rem;
    }

    .timer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .digit-container.small {
        width: 55px;
        height: 65px;
    }

    .timer-card .digit-display {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }

    .digit-container.large {
        width: 65px;
        height: 75px;
    }

    .pinned-timer .digit-display {
        font-size: 2rem;
    }

    .label-lg {
        font-size: 0.625rem;
    }

    .timer-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .pin-button {
        width: 100%;
    }
}