.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    border: 1px solid var(--glass-border);
    position: relative;
    z-index: 1;
    overflow: hidden;
    isolation: isolate;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.3s ease,
                filter 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.2);
}

.glass-card:active {
    transform: scale(0.98) translateY(-2px);
}

.glass-card.switching {
    animation: cardSwitch 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.no-animation .glass-card {
    transition: none;
}

body.no-animation .glass-card:hover {
    transform: none;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

body.no-animation .glass-card:active {
    transform: scale(1);
}

body.no-animation .glass-card.switching {
    animation: none;
}

.glass-card .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-mask: 
       linear-gradient(#fff 0 0) content-box, 
       linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    z-index: -1;
    pointer-events: none;
}

.glass-card.liquid-mode {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.quote-card.liquid-mode {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.card-header {
    margin-bottom: 30px;
}

.card-header h2 {
    font-weight: 300;
    font-size: 1.5rem;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    color: var(--text-color, #f5f5f7);
    transition: color 0.3s ease;
}

.countdown-display {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: -10px 0;
    color: var(--text-color, #f5f5f7);
    transition: color 0.3s ease;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    margin: 10px 17.5px;
}

.time-bar {
    width: 100%;
    height: 4px;
    margin-top: 10px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.ms-unit .time-bar {
    display: none;
}

.ms-unit {
    min-width: 70px;
}

.time-value {
    font-size: 4.5rem;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease, text-shadow 0.3s ease;
    cursor: default;
    display: inline-block;
}

.time-value.tick {
    animation: tick 0.2s ease-out;
}

body.no-animation .time-value.tick {
    animation: none;
}

body.no-animation .time-value,
body.no-animation .time-value.sm {
    transition: none;
}

body.no-animation .card-header h2,
body.no-animation .countdown-display,
body.no-animation #quote-content,
body.no-animation #quote-author {
    transition: none;
}

.time-value:hover {
    color: var(--secondary-color);
    text-shadow: 0 2px 12px rgba(255, 149, 0, 0.5);
}

.time-value.urgent:hover {
    color: #ff3b30;
    text-shadow: 0 2px 12px rgba(255, 59, 48, 0.5);
}

.time-value.ended:hover {
    color: var(--primary-color);
    text-shadow: 0 2px 12px rgba(0, 122, 255, 0.5);
}

.time-value.sm {
    font-size: 2rem;
    margin-top: 1rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.time-value.sm:hover {
    color: var(--secondary-color);
    text-shadow: 0 2px 8px rgba(255, 149, 0, 0.5);
}

.time-value.sm.urgent:hover {
    color: #ff3b30;
    text-shadow: 0 2px 8px rgba(255, 59, 48, 0.5);
}

.time-value.sm.ended:hover {
    color: var(--primary-color);
    text-shadow: 0 2px 8px rgba(0, 122, 255, 0.5);
}

.time-label {
    font-size: 1.1rem;
    margin-top: 8px;
    opacity: 0.7;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.quote-card {
    margin-top: 40px;
    padding: 20px 30px;
    border-radius: 15px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    box-sizing: border-box;
    isolation: isolate;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.quote-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

body.no-animation .quote-card {
    transition: none;
}

body.no-animation .quote-card:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.glass-card-sm {
    display: inline-block;
}

#quote-content {
    font-style: italic;
    font-size: 1.3rem;
    margin-bottom: 12px;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    color: var(--text-color, #f5f5f7);
    transition: color 0.3s ease;
}

#quote-author {
    display: block;
    text-align: right;
    font-size: 1.1rem;
    opacity: 0.7;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    color: var(--text-color, #f5f5f7);
    transition: color 0.3s ease;
}

@media (max-width: 768px) {
    .countdown-display {
        flex-wrap: wrap;
        justify-content: center;
        margin: -5px 0;
    }
    .time-unit:first-child {
        width: 100%;
        order: -1;
    }
    .time-unit:not(:first-child) {
        min-width: 50px;
        max-width: 80px;
    }
    .time-unit:first-child .time-value {
        font-size: 5rem;
    }
    .time-unit:not(:first-child) .time-value {
        font-size: 2rem;
    }
    .ms-unit {
        min-width: 45px;
        max-width: 45px;
    }
    .ms-unit .time-value {
        font-size: 1.3rem;
        margin-top: 0;
        font-variant-numeric: tabular-nums;
        text-align: center;
    }
    .time-unit:not(:first-child) .time-label {
        font-size: 0.8rem;
    }
    .ms-unit .time-label {
        font-size: 0.7rem;
    }
    .ms-unit .time-bar {
        display: block;
    }
    .time-bar {
        width: 80%;
        max-width: 150px;
    }
    .time-value {
        font-size: 3rem;
    }
    .glass-card {
        padding: 20px;
    }
    .card-header h2 {
        font-size: 1.2rem;
    }
    #quote-content {
        font-size: 1.1rem;
    }
    #quote-author {
        font-size: 0.95rem;
    }
}
