/* ===================================
   GABI'S TEA TIMER - TOTORO AESTHETIC
   =================================== */

:root {
    /* Forest & Earth Palette */
    --forest-deep: #2D4A3E;
    --forest-mid: #3D6B5A;
    --forest-light: #5A8F7B;
    --sage: #8FB39A;
    --sage-light: #B5D4BE;
    
    /* Warm Neutrals */
    --cream: #FDF6E9;
    --cream-dark: #F5E6D3;
    --parchment: #EDE0CC;
    --bark: #6B4E3D;
    --bark-light: #8B6B5A;
    
    /* Accent Colors */
    --sunset-gold: #E8B84A;
    --sunset-orange: #D4915C;
    --totoro-grey: #7A8B8C;
    --sky-soft: #A7C4C2;
    
    /* Functional */
    --text-primary: #3D3D3D;
    --text-secondary: #6B6B6B;
    --text-muted: #9A9A9A;
    --shadow-soft: rgba(45, 74, 62, 0.12);
    --shadow-medium: rgba(45, 74, 62, 0.2);
    
    /* Sizing */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

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

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Nunito', -apple-system, sans-serif;
    background: linear-gradient(
        135deg,
        var(--cream) 0%,
        var(--cream-dark) 50%,
        var(--parchment) 100%
    );
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* Textured Background Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, var(--sage-light) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--sky-soft) 0%, transparent 40%),
        radial-gradient(circle at 40% 40%, var(--sunset-gold) 0%, transparent 30%);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

/* ===================================
   FLOATING LEAVES DECORATION
   =================================== */

.floating-leaves {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.leaf {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--forest-light);
    border-radius: 0 70% 0 70%;
    opacity: 0.3;
    animation: float-leaf 20s infinite ease-in-out;
}

.leaf-1 { left: 10%; top: -30px; animation-delay: 0s; animation-duration: 18s; }
.leaf-2 { left: 30%; top: -30px; animation-delay: 4s; animation-duration: 22s; width: 15px; height: 15px; }
.leaf-3 { left: 50%; top: -30px; animation-delay: 8s; animation-duration: 20s; }
.leaf-4 { left: 70%; top: -30px; animation-delay: 12s; animation-duration: 24s; width: 18px; height: 18px; }
.leaf-5 { left: 90%; top: -30px; animation-delay: 16s; animation-duration: 19s; width: 14px; height: 14px; }

@keyframes float-leaf {
    0% {
        transform: translateY(-30px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ===================================
   SCREENS
   =================================== */

.screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 10;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   LOADING SCREEN
   =================================== */

#loading-screen {
    background: linear-gradient(
        180deg,
        var(--forest-deep) 0%,
        var(--forest-mid) 50%,
        var(--forest-light) 100%
    );
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.loading-content {
    text-align: center;
    animation: fade-in 0.8s ease-out;
}

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

.totoro-silhouette {
    width: 80px;
    height: 100px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 40px 40px 35px 35px;
    margin: 0 auto 20px;
    position: relative;
    animation: totoro-breathe 3s ease-in-out infinite;
}

.totoro-silhouette::before,
.totoro-silhouette::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
}

.totoro-silhouette::before {
    width: 25px;
    height: 35px;
    border-radius: 50% 50% 0 0;
    top: -20px;
    left: 8px;
}

.totoro-silhouette::after {
    width: 25px;
    height: 35px;
    border-radius: 50% 50% 0 0;
    top: -20px;
    right: 8px;
}

@keyframes totoro-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.loading-title {
    font-family: 'Caveat', cursive;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Teacup with Steam */
.teacup-icon {
    position: relative;
    width: 60px;
    height: 50px;
    margin: 0 auto 25px;
}

.cup {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 35px;
    background: var(--cream);
    border-radius: 0 0 25px 25px;
    box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.1);
}

.cup::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 5px;
    width: 15px;
    height: 20px;
    border: 3px solid var(--cream);
    border-left: none;
    border-radius: 0 10px 10px 0;
}

.steam {
    position: absolute;
    bottom: 35px;
    width: 8px;
    height: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    filter: blur(3px);
    animation: steam-rise 2s ease-out infinite;
}

.steam-1 { left: 15px; animation-delay: 0s; }
.steam-2 { left: 26px; animation-delay: 0.5s; }
.steam-3 { left: 37px; animation-delay: 1s; }

@keyframes steam-rise {
    0% {
        opacity: 0;
        transform: translateY(0) scaleX(1);
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateY(-30px) scaleX(1.5);
    }
}

.loading-bar-container {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin: 0 auto 15px;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--sunset-gold), var(--sunset-orange));
    border-radius: 3px;
    animation: loading-progress 2s ease-in-out forwards;
}

@keyframes loading-progress {
    0% { width: 0%; }
    20% { width: 20%; }
    50% { width: 60%; }
    80% { width: 85%; }
    100% { width: 100%; }
}

.loading-text {
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    color: var(--cream-dark);
    opacity: 0.9;
}

/* ===================================
   HOME SCREEN
   =================================== */

#home-screen {
    background: transparent;
}

.home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-top: env(safe-area-inset-top, 10px);
}

.page-title {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    font-weight: 600;
    color: var(--forest-deep);
}

.icon-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--cream);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px var(--shadow-soft);
    transition: all 0.3s ease;
}

.icon-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.icon-btn:active {
    transform: scale(0.95);
}

.icon-btn svg {
    width: 22px;
    height: 22px;
    color: var(--forest-mid);
}

/* ===================================
   TEA GRID
   =================================== */

.tea-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 25px;
    flex: 1;
}

/* ===================================
   TEA CARDS
   =================================== */

.tea-card {
    perspective: 1000px;
    height: 160px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.tea-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.card-front {
    background: linear-gradient(145deg, var(--cream) 0%, var(--cream-dark) 100%);
    box-shadow: 
        0 4px 15px var(--shadow-soft),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.tea-card:not(.add-card):hover .card-front,
.tea-card.selected .card-front {
    border-color: var(--forest-mid);
    box-shadow: 
        0 6px 20px var(--shadow-medium),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.tea-card.selected .card-front {
    background: linear-gradient(145deg, var(--sage-light) 0%, var(--sage) 100%);
}

.card-back {
    background: linear-gradient(145deg, var(--forest-mid) 0%, var(--forest-deep) 100%);
    box-shadow: 0 4px 15px var(--shadow-medium);
    transform: rotateY(180deg);
    color: var(--cream);
}

.flip-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

.flip-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.flip-btn svg {
    width: 16px;
    height: 16px;
    color: var(--forest-deep);
}

.back-flip {
    left: auto;
    right: 10px;
}

.back-flip svg {
    color: var(--cream);
}

.tea-emoji {
    font-size: 3rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tea-name {
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--forest-deep);
}

.card-back .tea-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    margin-top: 35px;
    padding-bottom: 10px;
    position: relative;
    z-index: 1;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

.detail-value {
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    font-weight: 600;
}

.edit-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    color: var(--cream);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.edit-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.edit-btn svg {
    width: 16px;
    height: 16px;
}

/* Add Card */
.add-card .card-front {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.3) 100%);
    border: 2px dashed var(--sage);
    box-shadow: none;
}

.add-card:hover .card-front {
    border-color: var(--forest-mid);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.add-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--sage-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.add-card:hover .add-icon {
    background: var(--forest-light);
    transform: scale(1.1);
}

.add-icon svg {
    width: 24px;
    height: 24px;
    color: var(--forest-deep);
}

.add-card .tea-name {
    color: var(--text-secondary);
}

/* ===================================
   BUTTONS
   =================================== */

.start-section {
    padding: 10px 0;
    padding-bottom: env(safe-area-inset-bottom, 10px);
}

.primary-btn {
    width: 100%;
    padding: 16px 32px;
    border: none;
    background: linear-gradient(145deg, var(--forest-mid) 0%, var(--forest-deep) 100%);
    color: var(--cream);
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-xl);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px var(--shadow-medium);
    transition: all 0.3s ease;
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

.primary-btn:active:not(:disabled) {
    transform: translateY(0);
}

.primary-btn:disabled {
    background: var(--totoro-grey);
    cursor: not-allowed;
    opacity: 0.6;
}

.primary-btn svg {
    width: 20px;
    height: 20px;
}

.secondary-btn {
    padding: 14px 28px;
    border: 2px solid var(--forest-mid);
    background: transparent;
    color: var(--forest-mid);
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: var(--forest-mid);
    color: var(--cream);
}

.secondary-btn svg {
    width: 18px;
    height: 18px;
}

/* ===================================
   TIMER SCREEN
   =================================== */

#timer-screen {
    background: linear-gradient(
        180deg,
        var(--cream) 0%,
        var(--cream-dark) 100%
    );
    justify-content: center;
    align-items: center;
}

.timer-content {
    text-align: center;
    width: 100%;
    max-width: 320px;
    animation: fade-in 0.5s ease-out;
}

.timer-tea-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 30px;
}

.timer-tea-name {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    font-weight: 600;
    color: var(--forest-deep);
}

.timer-tea-temp {
    font-size: 1.1rem;
    color: var(--sunset-orange);
    font-weight: 600;
}

.timer-circle {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 25px;
}

.timer-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-ring-bg {
    fill: none;
    stroke: var(--parchment);
    stroke-width: 8;
}

.timer-ring-progress {
    fill: none;
    stroke: url(#timer-gradient);
    stroke: var(--forest-mid);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: baseline;
}

.timer-minutes,
.timer-seconds {
    font-family: 'Caveat', cursive;
    font-size: 4rem;
    font-weight: 700;
    color: var(--forest-deep);
    min-width: 2ch;
}

.timer-separator {
    font-family: 'Caveat', cursive;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--forest-deep);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.timer-message {
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

#cancel-timer-btn {
    margin: 0 auto;
}

/* ===================================
   COMPLETE SCREEN
   =================================== */

#complete-screen {
    background: linear-gradient(
        180deg,
        var(--sage-light) 0%,
        var(--cream) 50%,
        var(--cream-dark) 100%
    );
    justify-content: center;
    align-items: center;
}

.complete-content {
    text-align: center;
    width: 100%;
    max-width: 320px;
    animation: celebration 0.6s ease-out;
}

@keyframes celebration {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.complete-icon {
    position: relative;
    width: 100px;
    height: 90px;
    margin: 0 auto 25px;
}

.complete-cup {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 55px;
    background: linear-gradient(145deg, var(--forest-mid) 0%, var(--forest-deep) 100%);
    border-radius: 0 0 40px 40px;
    box-shadow: 
        inset 0 -15px 30px rgba(0, 0, 0, 0.2),
        0 4px 15px var(--shadow-medium);
}

.complete-cup::after {
    content: '';
    position: absolute;
    right: -18px;
    top: 8px;
    width: 22px;
    height: 30px;
    border: 5px solid var(--forest-mid);
    border-left: none;
    border-radius: 0 15px 15px 0;
}

.complete-icon .steam {
    bottom: 55px;
    height: 30px;
    width: 12px;
}

.complete-icon .steam-1 { left: 25px; }
.complete-icon .steam-2 { left: 44px; }
.complete-icon .steam-3 { left: 63px; }

.complete-title {
    font-family: 'Caveat', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--forest-deep);
    margin-bottom: 8px;
}

.complete-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 35px;
}

.complete-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===================================
   MODALS
   =================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 74, 62, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    max-height: 85vh;
    background: var(--cream);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-family: 'Caveat', cursive;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--forest-deep);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--parchment);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--sage-light);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
}

/* Settings */
.settings-body {
    margin-bottom: 30px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--parchment);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.setting-label {
    font-weight: 600;
    color: var(--text-primary);
}

.setting-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 52px;
    height: 28px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--parchment);
    border-radius: 28px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle input:checked + .toggle-slider {
    background: var(--forest-mid);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* Volume Control */
.volume-setting {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.volume-icon-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

.volume-icon-btn:hover {
    background-color: var(--parchment);
}

.volume-icon {
    width: 24px;
    height: 24px;
    color: var(--forest-deep);
}

.volume-icon .speaker-base {
    fill: currentColor;
    stroke: currentColor;
}

.volume-icon .volume-bar-1,
.volume-icon .volume-bar-2,
.volume-icon .volume-bar-3 {
    fill: none;
    stroke: currentColor;
    transition: opacity 0.2s ease;
}

.volume-icon .mute-x {
    stroke: currentColor;
}

.volume-icon.muted .speaker-base {
    opacity: 0.5;
}

.volume-icon.muted .mute-x {
    display: block !important;
}

.volume-icon.muted .volume-bar-1,
.volume-icon.muted .volume-bar-2,
.volume-icon.muted .volume-bar-3 {
    display: none;
}

.volume-icon.low .volume-bar-2,
.volume-icon.low .volume-bar-3 {
    opacity: 0.2;
}

.volume-icon.medium .volume-bar-3 {
    opacity: 0.2;
}

.volume-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--parchment);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--forest-mid);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: var(--forest-deep);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--forest-mid);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    background: var(--forest-deep);
}

.volume-slider::-moz-range-track {
    background: var(--parchment);
    border-radius: 3px;
    height: 6px;
}

/* Credits */
.credits {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--parchment);
}

.credits h3 {
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    color: var(--forest-deep);
    margin-bottom: 8px;
}

.credits p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.credit-note {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    margin-top: 8px;
}

/* Edit Form */
.edit-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input {
    padding: 14px 16px;
    border: 2px solid var(--parchment);
    border-radius: var(--radius-md);
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    background: white;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--forest-mid);
    box-shadow: 0 0 0 3px rgba(61, 107, 90, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.form-actions .secondary-btn,
.form-actions .primary-btn {
    padding: 14px 20px;
}

/* Delete Button */
.delete-tea-btn {
    width: 100%;
    padding: 12px 20px;
    margin-top: 20px;
    border: none;
    background: transparent;
    color: #c45c5c;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.delete-tea-btn:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.delete-tea-btn svg {
    width: 18px;
    height: 18px;
}

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

@media (min-width: 400px) {
    .tea-grid {
        gap: 20px;
    }
    
    .tea-card {
        height: 180px;
    }
    
    .tea-emoji {
        font-size: 3.5rem;
    }
}

@media (min-width: 500px) {
    .screen {
        padding: 30px;
    }
    
    .modal-content {
        border-radius: var(--radius-xl);
        margin: 20px;
        max-height: 80vh;
    }
    
    .modal {
        align-items: center;
    }
}

/* ===================================
   ANIMATIONS FOR PAGE TRANSITIONS
   =================================== */

.screen.slide-in {
    animation: slide-in-up 0.4s ease-out forwards;
}

.screen.slide-out {
    animation: slide-out-down 0.3s ease-in forwards;
}

@keyframes slide-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-out-down {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

/* Card Selection Animation */
.tea-card.selected .card-inner {
    animation: card-selected 0.3s ease-out;
}

@keyframes card-selected {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
