/* ============================================
   PREMIUM FLIP DESK CLOCK - STYLES
   ============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(15, 15, 25, 0.90);
    --bg-card-hover: rgba(25, 25, 40, 0.95);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shine: rgba(255, 255, 255, 0.05);

    --gold-primary: #d4a853;
    --gold-secondary: #f0d78c;
    --gold-dark: #8b6914;
    --gold-glow: rgba(212, 168, 83, 0.3);

    --text-primary: #ffffff;
    --text-secondary: #a9a5b6;
    --text-muted: #736e80;

    --card-bg: linear-gradient(145deg, #1a1a2e 0%, #16162a 50%, #111125 100%);
    --flip-top-bg: linear-gradient(180deg, #1e1e36 0%, #1a1a30 100%);
    --flip-bottom-bg: linear-gradient(180deg, #151528 0%, #12122a 100%);

    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 40px rgba(212, 168, 83, 0.08);
    --shadow-deep: 0 20px 60px rgba(0, 0, 0, 0.7);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --font-display: 'JetBrains Mono', 'SF Mono', monospace;
    --font-body: 'Outfit', -apple-system, sans-serif;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

/* GPU acceleration for animated elements */
.flip-card,
.card-flip-top,
.card-flip-bottom,
.particle,
.dot,
.live-dot {
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .particle { display: none; }
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    -webkit-tap-highlight-color: transparent;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(212, 168, 83, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(100, 80, 200, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(50, 50, 120, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   PARTICLES
   ============================================ */

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--gold-primary);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        opacity: 0;
        transform: translateY(-10vh) scale(1);
    }
}

/* ============================================
   GLASS CARD
   ============================================ */

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    contain: layout style;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 168, 83, 0.2), transparent);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(212, 168, 83, 0.15);
    box-shadow: var(--shadow-soft), var(--shadow-gold);
    transform: translateY(-2px);
}

/* ============================================
   MAIN CLOCK WRAPPER
   ============================================ */

.clock-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    z-index: 1;
    position: relative;
    margin-right: 40px;
}

/* ============================================
   DATE DISPLAY
   ============================================ */

.date-display {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.1rem;
    color: var(--text-secondary);
    letter-spacing: 4px;
    text-transform: uppercase;
    padding: 12px 28px;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    background: rgba(20, 20, 35, 0.5);
    backdrop-filter: blur(10px);
    animation: fadeInDown 0.8s ease;
}

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

/* ============================================
   FLIP CLOCK
   ============================================ */

.flip-clock {
    display: flex;
    align-items: center;
    gap: 16px;
    perspective: 1000px;
    animation: fadeInUp 1s ease;
}

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

.flip-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.flip-label {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--gold-primary);
    text-transform: uppercase;
    opacity: 0.7;
}

.flip-digits {
    display: flex;
    gap: 6px;
}

/* ============================================
   FLIP CARD
   ============================================ */

.flip-card {
    position: relative;
    width: 90px;
    height: 130px;
    perspective: 800px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Top and Bottom halves */
.card-top,
.card-bottom {
    position: absolute;
    width: 100%;
    height: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-top {
    top: 0;
    background: var(--flip-top-bg);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-bottom: none;
    align-items: flex-end;
    box-shadow: inset 0 -1px 3px rgba(0, 0, 0, 0.3);
}

.card-top .digit {
    transform: translateY(50%);
}

.card-bottom {
    bottom: 0;
    background: var(--flip-bottom-bg);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border-top: none;
    align-items: flex-start;
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.4);
}

.card-bottom .digit {
    transform: translateY(-50%);
}

/* Center line divider */
.flip-card-inner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Digit styling */
.digit {
    font-family: var(--font-display);
    font-size: 5.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    text-shadow: 0 0 20px rgba(212, 168, 83, 0.15);
    user-select: none;
}

/* Flip animation panels */
.card-flip-top,
.card-flip-bottom {
    position: absolute;
    width: 100%;
    height: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-flip-top {
    top: 0;
    background: var(--flip-top-bg);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-bottom: none;
    align-items: flex-end;
    transform-origin: bottom center;
    transform: rotateX(0deg);
    z-index: 25;
    display: none;
}

.card-flip-top .digit {
    transform: translateY(50%);
}

.card-flip-bottom {
    bottom: 0;
    background: var(--flip-bottom-bg);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border-top: none;
    align-items: flex-start;
    transform-origin: top center;
    transform: rotateX(90deg);
    z-index: 25;
    display: none;
}

.card-flip-bottom .digit {
    transform: translateY(-50%);
}

/* Flip animation */
.card-flip-top.flipping {
    display: flex;
    animation: flipTop 0.5s cubic-bezier(0.33, 0, 0.67, 1) forwards;
}

.card-flip-bottom.flipping {
    display: flex;
    animation: flipBottom 0.5s cubic-bezier(0.33, 1, 0.67, 1) 0.25s forwards;
}

@keyframes flipTop {
    0% {
        transform: rotateX(0deg);
    }
    100% {
        transform: rotateX(-90deg);
    }
}

@keyframes flipBottom {
    0% {
        transform: rotateX(90deg);
    }
    100% {
        transform: rotateX(0deg);
    }
}

/* Shadow during flip */
.card-flip-top.flipping::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4));
    animation: flipTopShadow 0.5s ease-out forwards;
}

@keyframes flipTopShadow {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.card-flip-bottom.flipping::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to top, transparent, rgba(0, 0, 0, 0.4));
    animation: flipBottomShadow 0.5s ease-out forwards;
}

@keyframes flipBottomShadow {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Glow on change */
.flip-card.changing {
    filter: drop-shadow(0 0 15px rgba(212, 168, 83, 0.2));
}

/* ============================================
   SEPARATOR
   ============================================ */

.separator {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    background: var(--gold-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--gold-glow);
    animation: dotPulse 1s ease-in-out infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.5s;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}

/* ============================================
   AM/PM INDICATOR
   ============================================ */

.ampm-indicator {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--gold-primary);
    padding: 8px 24px;
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: 50px;
    background: rgba(212, 168, 83, 0.05);
    animation: fadeInUp 1.2s ease;
}

/* ============================================
   SIDE PANEL
   ============================================ */

.side-panel {
    position: fixed;
    right: 24px;
    top: 12px;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 10;
    width: 255px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    animation: slideInRight 1s ease 0.3s both;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 168, 83, 0.15) transparent;
}

.side-panel::-webkit-scrollbar {
    width: 3px;
}

.side-panel::-webkit-scrollbar-track {
    background: transparent;
}

.side-panel::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 83, 0.2);
    border-radius: 10px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   KATHMANDU CARD
   ============================================ */

.kathmandu-card {
    padding: 18px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.card-icon {
    font-size: 1.4rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 168, 83, 0.08);
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.card-title h3 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.timezone-label,
.weather-location {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 1px;
}

.kathmandu-time {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--gold-secondary);
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(212, 168, 83, 0.2);
    margin-bottom: 2px;
}

.kathmandu-ampm {
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold-primary);
    letter-spacing: 3px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.kathmandu-date {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* ============================================
   WEATHER CARD
   ============================================ */

.weather-card {
    padding: 16px;
}

.weather-icon-main {
    font-size: 1.8rem;
}

.weather-temp {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 2px;
    background: linear-gradient(135deg, var(--gold-secondary), var(--text-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.weather-desc {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

.weather-details {
    display: flex;
    gap: 12px;
}

.weather-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 6px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.detail-icon {
    font-size: 1.1rem;
}

.detail-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-value {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   LIVE BADGE
   ============================================ */

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    margin-top: 10px;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #4ade80;
    opacity: 0.8;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

/* ============================================
   SOUND TOGGLE
   ============================================ */

.sound-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    outline: none;
}

.sound-toggle:hover {
    color: var(--gold-primary);
    border-color: rgba(212, 168, 83, 0.3);
    box-shadow: 0 0 20px rgba(212, 168, 83, 0.1);
    transform: scale(1.05);
}

.sound-toggle.active {
    color: var(--gold-primary);
    border-color: rgba(212, 168, 83, 0.3);
}

.fullscreen-toggle {
    position: fixed;
    bottom: 30px;
    left: 95px;
    width: 50px;
    height: 50px;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    outline: none;
}

.fullscreen-toggle:hover {
    color: var(--gold-primary);
    border-color: rgba(212, 168, 83, 0.3);
    box-shadow: 0 0 20px rgba(212, 168, 83, 0.1);
    transform: scale(1.05);
}

.fullscreen-toggle.active {
    color: var(--gold-primary);
    border-color: rgba(212, 168, 83, 0.3);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Large desktops / narrower screens */
@media (max-width: 1300px) {
    .side-panel {
        width: 230px;
        right: 16px;
    }

    .flip-card {
        width: 75px;
        height: 110px;
    }

    .digit {
        font-size: 4.5rem;
    }

    .clock-wrapper {
        margin-right: 20px;
    }
}

/* ============================================
   TABLET LANDSCAPE
   iPad (1024x768), iPad Air, iPad Pro 11",
   Surface Pro, Galaxy Tab S
   ============================================ */

/* Tablet landscape: side-by-side layout */
@media (min-width: 768px) and (max-width: 1199px) and (orientation: landscape) {
    body {
        padding: 16px 20px;
        gap: 0;
        overflow: hidden;
    }

    .clock-wrapper {
        margin-right: 16px;
        gap: 16px;
        transform: scale(0.9);
        transform-origin: center center;
    }

    .flip-card {
        width: 68px;
        height: 100px;
    }

    .digit {
        font-size: 4.2rem;
    }

    .flip-clock {
        gap: 12px;
    }

    .date-display {
        font-size: 0.9rem;
        padding: 8px 20px;
        letter-spacing: 3px;
    }

    .side-panel {
        position: fixed;
        width: 220px;
        right: 12px;
        top: 10px;
        bottom: 10px;
        gap: 10px;
    }

    .kathmandu-card,
    .weather-card {
        padding: 12px;
    }

    .card-header {
        margin-bottom: 8px;
        gap: 8px;
    }

    .card-icon {
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
    }

    .card-title h3 {
        font-size: 0.75rem;
    }

    .kathmandu-time {
        font-size: 1.4rem;
        margin-bottom: 1px;
    }

    .kathmandu-ampm {
        font-size: 0.6rem;
        margin-bottom: 4px;
    }

    .kathmandu-date {
        font-size: 0.62rem;
    }

    .weather-temp {
        font-size: 1.8rem;
    }

    .weather-desc {
        font-size: 0.68rem;
        margin-bottom: 8px;
    }

    .weather-detail {
        padding: 6px 4px;
        gap: 2px;
    }

    .detail-icon {
        font-size: 0.9rem;
    }

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

    .detail-value {
        font-size: 0.65rem;
    }

    .live-badge {
        margin-top: 6px;
        font-size: 0.5rem;
    }

    .ampm-indicator {
        font-size: 1rem;
        padding: 6px 18px;
    }

    .sound-toggle {
        bottom: 16px;
        left: 16px;
        width: 42px;
        height: 42px;
    }

    .fullscreen-toggle {
        bottom: 16px;
        left: 70px;
        width: 42px;
        height: 42px;
    }
}

/* iPad Pro 12.9" landscape */
@media (min-width: 1200px) and (max-width: 1400px) and (orientation: landscape) {
    .side-panel {
        width: 240px;
    }

    .clock-wrapper {
        margin-right: 30px;
    }
}

/* ============================================
   TABLET PORTRAIT & SMALL LAPTOPS
   ============================================ */
@media (max-width: 1050px) and (orientation: portrait) {
    body {
        flex-direction: column;
        overflow-y: auto;
        padding: 30px 20px 60px;
        gap: 30px;
    }

    .clock-wrapper {
        margin-right: 0;
    }

    .side-panel {
        position: relative;
        right: auto;
        top: auto;
        bottom: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        max-width: 600px;
        overflow: visible;
        animation: fadeInUp 1s ease 0.3s both;
    }

    .side-panel .kathmandu-card {
        grid-column: 1 / -1;
    }
}

/* Stacked on narrow portrait screens */
@media (max-width: 1050px) and (orientation: portrait) and (max-width: 599px) {
    .side-panel {
        grid-template-columns: 1fr;
    }
}

/* Small non-landscape screens fallback */
@media (max-width: 1050px) and (not (orientation: landscape)) {
    body {
        flex-direction: column;
        overflow-y: auto;
        padding: 30px 20px 60px;
        gap: 30px;
    }

    .clock-wrapper {
        margin-right: 0;
    }

    .side-panel {
        position: relative;
        right: auto;
        top: auto;
        bottom: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        max-width: 600px;
        overflow: visible;
        animation: fadeInUp 1s ease 0.3s both;
    }

    .side-panel .kathmandu-card {
        grid-column: 1 / -1;
    }
}

/* ============================================
   PHONE SCREENS
   ============================================ */
@media (max-width: 700px) {
    .flip-card {
        width: 52px;
        height: 78px;
    }

    .digit {
        font-size: 3.2rem;
    }

    .flip-clock {
        gap: 8px;
    }

    .flip-digits {
        gap: 4px;
    }

    .separator .dot {
        width: 7px;
        height: 7px;
    }

    .separator {
        gap: 10px;
        padding-top: 14px;
    }

    .flip-label {
        font-size: 0.5rem;
        letter-spacing: 2px;
    }

    .date-display {
        font-size: 0.8rem;
        letter-spacing: 2px;
        padding: 8px 18px;
    }

    .side-panel {
        grid-template-columns: 1fr;
    }

    .kathmandu-time {
        font-size: 1.6rem;
    }

    .weather-temp {
        font-size: 1.8rem;
    }
}

/* Phone landscape */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
    body {
        flex-direction: row;
        padding: 10px 16px;
        gap: 16px;
        overflow: hidden;
    }

    .clock-wrapper {
        margin-right: 0;
        transform: scale(0.75);
        transform-origin: center center;
        gap: 10px;
    }

    .side-panel {
        position: relative;
        right: auto;
        top: auto;
        bottom: auto;
        width: 200px;
        min-width: 200px;
        max-height: 100%;
        overflow-y: auto;
        gap: 8px;
    }

    .kathmandu-card,
    .weather-card {
        padding: 10px;
    }

    .weather-temp {
        font-size: 1.5rem;
    }

    .kathmandu-time {
        font-size: 1.2rem;
    }

    .sound-toggle {
        bottom: 8px;
        left: 8px;
        width: 36px;
        height: 36px;
    }

    .fullscreen-toggle {
        bottom: 8px;
        left: 56px;
        width: 36px;
        height: 36px;
    }
}

/* Very small phones */
@media (max-width: 480px) {
    .flip-card {
        width: 42px;
        height: 64px;
    }

    .digit {
        font-size: 2.6rem;
    }

    .flip-clock {
        gap: 6px;
    }

    .ampm-indicator {
        font-size: 0.9rem;
        letter-spacing: 3px;
    }

    .sound-toggle {
        bottom: 20px;
        left: 20px;
    }

    .fullscreen-toggle {
        bottom: 20px;
        left: 80px;
    }
}
