/* ==================== CSS VARIABLES ==================== */
:root {
    /* Light Mode - Kawaii Vibrant Colors */
    --bg-primary: #FFF5F7;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;

    --accent-primary: #FF6B9D;
    --accent-secondary: #C06C84;
    --accent-tertiary: #FFC2D1;
    --accent-gradient: linear-gradient(135deg, #FF6B9D 0%, #C06C84 100%);

    --text-primary: #2D1B2E;
    --text-secondary: #6D5D6E;
    --text-muted: #A69CA7;

    --border-color: #FFE5EC;
    --shadow-sm: 0 2px 8px rgba(255, 107, 157, 0.1);
    --shadow-md: 0 4px 20px rgba(255, 107, 157, 0.15);
    --shadow-lg: 0 8px 32px rgba(255, 107, 157, 0.2);
    --shadow-xl: 0 12px 48px rgba(255, 107, 157, 0.25);

    --success: #4ECDC4;
    --warning: #FFE66D;
    --info: #A6E1FA;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;

    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Typography */
    --font-display: 'JetBrains Mono', monospace;
    --font-japanese: 'JetBrains Mono', monospace;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-primary: #1A0E1F;
    --bg-secondary: #2D1B2E;
    --bg-card: #3D2B3E;

    --text-primary: #FFF5F7;
    --text-secondary: #E5D5E6;
    --text-muted: #A69CA7;

    --border-color: #4D3D4E;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.6);
}

/* ==================== RESET & BASE ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-display);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background var(--transition-base), color var(--transition-base);
}

/* ==================== THEME TOGGLE ==================== */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-lg);
}

.theme-icon {
    font-size: 1.5rem;
    transition: transform var(--transition-base);
}

/* ==================== SAKURA PETALS ==================== */
.sakura-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.sakura-petal {
    position: absolute;
    font-size: clamp(1rem, 2vw, 1.5rem);
    animation: sakuraFall linear infinite;
    opacity: 0.7;
}

@keyframes sakuraFall {
    0% {
        transform: translateY(-10vh) rotate(0deg) translateX(0);
        opacity: 0.8;
    }

    50% {
        transform: translateY(50vh) rotate(180deg) translateX(20px);
    }

    100% {
        transform: translateY(110vh) rotate(360deg) translateX(0);
        opacity: 0;
    }
}

/* ==================== CONTAINER ==================== */
.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-lg);
}

/* ==================== HEADER ==================== */
.header {
    margin-bottom: var(--space-xl);
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.logo-group {
    flex: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    margin-bottom: var(--space-xs);
}

.logo-icon {
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.logo-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.tagline {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==================== STREAK DISPLAY ==================== */
.streak-display {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-card);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

.streak-display:hover {
    transform: translateY(-4px);
}

.streak-flame {
    font-size: 2rem;
    animation: flicker 2s ease-in-out infinite;
}

@keyframes flicker {

    0%,
    100% {
        transform: scale(1) rotate(-5deg);
    }

    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

.streak-count {
    display: block;
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--accent-primary);
    line-height: 1;
}

.streak-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-lg);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== TIMER CARD ==================== */
.timer-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.timer-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-tertiary) 0%, transparent 70%);
    opacity: 0.05;
    animation: rotate 30s linear infinite;
}

/* ==================== CHIBI CHARACTER ==================== */
.chibi-container {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.chibi-character {
    display: inline-block;
    position: relative;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

.chibi-body {
    width: 120px;
    height: 120px;
    position: relative;
}

.chibi-head {
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 50% 50% 45% 45%;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.chibi-hair {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 40px;
    background: #6D5D6E;
    border-radius: 50% 50% 0 0;
}

.chibi-face {
    position: relative;
    width: 100%;
    height: 100%;
}

.chibi-eyes {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.chibi-eye {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    position: relative;
    animation: blink 4s infinite;
}

@keyframes blink {

    0%,
    96%,
    100% {
        transform: scaleY(1);
    }

    98% {
        transform: scaleY(0.1);
    }
}

.pupil {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--text-primary);
    border-radius: 50%;
}

.chibi-blush {
    position: absolute;
    top: 52%;
    width: 20px;
    height: 14px;
    background: rgba(255, 107, 157, 0.4);
    border-radius: 50%;
}

.chibi-blush.left {
    left: 15px;
}

.chibi-blush.right {
    right: 15px;
}

.chibi-mouth {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 12px;
    border: 3px solid var(--text-primary);
    border-top: none;
    border-radius: 0 0 25px 25px;
}

.chibi-sparkles {
    position: absolute;
    width: 200%;
    height: 200%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.chibi-sparkles span {
    position: absolute;
    font-size: 1.5rem;
    animation: sparkle 3s ease-in-out infinite;
}

.chibi-sparkles span:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.chibi-sparkles span:nth-child(2) {
    top: 10%;
    right: 10%;
    animation-delay: 1s;
}

.chibi-sparkles span:nth-child(3) {
    bottom: 10%;
    left: 50%;
    animation-delay: 2s;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

.chibi-message {
    margin-top: var(--space-md);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ==================== MODE BADGE ==================== */
.mode-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.mode-icon {
    font-size: 1.25rem;
}

/* ==================== TIMER DISPLAY ==================== */
.timer-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto var(--space-lg);
}

.timer-ring {
    transform: rotate(-90deg);
}

.timer-ring-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 12;
}

.timer-ring-progress {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
    filter: drop-shadow(0 0 8px rgba(255, 107, 157, 0.5));
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 900;
    color: var(--text-primary);
    font-family: var(--font-display);
    letter-spacing: -0.05em;
    line-height: 1;
}

.timer-label {
    position: absolute;
    bottom: 35%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ==================== CONTROLS ==================== */
.controls {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.control-btn {
    flex: 1;
    max-width: 160px;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    transition: all var(--transition-base);
    position: relative;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.control-btn:active {
    transform: translateY(-1px);
}

.start-btn {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.start-btn:hover {
    background: #FF5A8D;
    border-color: #FF5A8D;
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.4);
}

.pause-btn {
    background: var(--warning);
    border-color: var(--warning);
    color: var(--text-primary);
}

.pause-btn:hover {
    background: #FFD54F;
    border-color: #FFD54F;
    box-shadow: 0 8px 24px rgba(255, 230, 109, 0.4);
}

.reset-btn {
    background: transparent;
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.reset-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--text-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    display: none;
    /* Hide disabled buttons on mobile */
}

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

/* ==================== SESSION STATS ==================== */
.session-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-icon {
    display: block;
    font-size: 1.75rem;
    margin-bottom: var(--space-xs);
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--accent-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 2px;
    height: 40px;
    background: var(--border-color);
}

/* ==================== SIDE PANEL ==================== */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.panel-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
}

.section-title {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

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

/* ==================== BADGES ==================== */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.badge-item {
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
}

.badge-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.badge-item.locked {
    opacity: 0.4;
    filter: grayscale(1);
}

.badge-item.unlocked {
    opacity: 1;
    filter: grayscale(0);
    border-color: var(--accent-primary);
    animation: badgeUnlock 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgeUnlock {
    0% {
        transform: scale(0.8) rotate(-10deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.1) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.badge-emoji {
    display: block;
    font-size: 2rem;
    margin-bottom: var(--space-xs);
}

.badge-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.badge-desc {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ==================== SHARE SECTION ==================== */
.share-btn {
    width: 100%;
    padding: var(--space-md);
    background: #1DA1F2;
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.share-btn:hover {
    background: #1a91da;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.share-icon {
    font-size: 1.25rem;
}

.share-hint {
    margin-top: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* ==================== SETTINGS ==================== */
.setting-group {
    margin-bottom: var(--space-md);
}

.setting-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.setting-value {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.setting-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: var(--radius-full);
    outline: none;
    transition: all var(--transition-base);
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.setting-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    border: none;
}

.setting-slider:hover::-webkit-slider-thumb {
    transform: scale(1.2);
}

.setting-slider:hover::-moz-range-thumb {
    transform: scale(1.2);
}

.setting-toggles {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    transition: background var(--transition-base);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.toggle-label input:checked+.toggle-switch {
    background: var(--accent-primary);
}

.toggle-label input:checked+.toggle-switch::after {
    transform: translateX(24px);
}

/* ==================== TIPS SECTION ==================== */
.tips-section {
    margin: var(--space-xl) 0;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.tip-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    max-width: 800px;
    margin: 0 auto;
}

.tip-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.tip-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==================== FOOTER ==================== */
.footer {
    text-align: center;
    padding: var(--space-xl) 0;
    color: var(--text-muted);
    animation: fadeIn 0.6s ease-in-out 0.6s both;
}

.footer-text {
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
}

.kbd-hint {
    display: inline-block;
    margin-left: var(--space-sm);
}

kbd {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.footer-hashtags {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 600;
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-base);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--border-color);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header h3 {
    font-size: 1.75rem;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    gap: var(--space-sm);
}

.modal-btn {
    flex: 1;
    padding: var(--space-md);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
}

.modal-btn.primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.modal-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.modal-btn.secondary:hover {
    background: var(--border-color);
}

/* ==================== CHARACTER STATES ==================== */
/* Bounce animation disabled per user request */

.timer-active .chibi-sparkles {
    opacity: 1;
}

.timer-break .chibi-head {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
}

.timer-break .chibi-mouth {
    width: 30px;
    height: 8px;
    border-radius: 0 0 30px 30px;
}

.timer-break .chibi-eye {
    height: 4px;
    border-radius: 50%;
}

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

/* Tablet & Smaller Desktops (max-width: 1024px) */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .side-panel {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--space-md);
    }

    .timer-wrapper {
        width: 280px;
        height: 280px;
    }

    .timer-display {
        font-size: 3.5rem;
    }
}

/* Tablet Portrait (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --space-xs: 0.4rem;
        --space-sm: 0.75rem;
        --space-md: 1.25rem;
        --space-lg: 1.5rem;
        --space-xl: 2rem;
    }

    .container {
        padding: var(--space-md);
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }

    .logo {
        font-size: 2rem;
        justify-content: center;
    }

    .streak-display {
        justify-content: center;
    }

    .timer-card {
        padding: var(--space-lg);
    }

    .timer-wrapper {
        width: 260px;
        height: 260px;
    }

    .timer-display {
        font-size: 3rem;
    }

    .controls {
        flex-wrap: wrap;
    }

    .control-btn {
        max-width: none;
        min-width: 120px;
        font-size: 0.85rem;
        padding: var(--space-sm) var(--space-md);
    }

    .session-stats {
        padding: var(--space-md);
        gap: var(--space-sm);
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-icon {
        font-size: 1.5rem;
    }

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

    .badges-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xs);
    }

    .badge-item {
        padding: var(--space-xs);
    }

    .badge-emoji {
        font-size: 1.75rem;
    }

    .badge-name {
        font-size: 0.7rem;
    }

    .badge-desc {
        font-size: 0.65rem;
    }

    .setting-slider {
        margin-top: var(--space-xs);
    }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
    :root {
        --space-xs: 0.35rem;
        --space-sm: 0.6rem;
        --space-md: 1rem;
        --space-lg: 1.25rem;
        --space-xl: 1.5rem;
    }

    body {
        font-size: 14px;
    }

    .container {
        padding: 0.75rem;
        max-width: 100%;
    }

    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }

    .logo {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .streak-count {
        font-size: 1.5rem;
    }

    .streak-label {
        font-size: 0.65rem;
    }

    .timer-card {
        padding: 1.25rem;
        border-radius: var(--radius-md);
        margin-bottom: var(--space-md);
    }

    .mode-badge {
        font-size: 0.85rem;
        padding: var(--space-xs) var(--space-sm);
    }

    .timer-wrapper {
        width: auto;
        height: auto;
        margin: 0 auto 2rem auto;
        display: block;
    }

    /* Hide the circle/ring on mobile */
    .timer-ring {
        display: none;
    }

    .timer-display {
        font-size: 4rem;
        position: static;
        transform: none;
        margin-bottom: 0.5rem;
    }

    .timer-label {
        position: static;
        transform: none;
        font-size: 0.9rem;
        margin-top: 0.25rem;
    }

    .controls {
        gap: var(--space-sm);
        justify-content: center;
    }

    .control-btn {
        flex: 0 0 auto;
        min-width: 100px;
        max-width: 130px;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        border-radius: var(--radius-md);
    }

    .control-btn:disabled {
        display: none;
        /* Hide disabled buttons to prevent overlap */
    }

    .btn-icon {
        font-size: 1rem;
    }

    .session-stats {
        padding: 1rem 0.75rem;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        border-radius: var(--radius-md);
    }

    .stat-item {
        flex: 1;
        min-width: 70px;
    }

    .stat-divider {
        display: none;
    }

    .stat-icon {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .panel-section {
        padding: 1rem;
        border-radius: var(--radius-md);
        margin-bottom: var(--space-md);
    }

    .section-title {
        font-size: 1rem;
        margin-bottom: var(--space-sm);
    }

    .title-icon {
        font-size: 1.25rem;
    }

    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xs);
    }

    .badge-item {
        padding: var(--space-xs);
        border-radius: var(--radius-sm);
    }

    .badge-emoji {
        font-size: 1.5rem;
    }

    .badge-name {
        font-size: 0.65rem;
    }

    .badge-desc {
        font-size: 0.6rem;
    }

    .share-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
    }

    .share-icon {
        font-size: 1.25rem;
    }

    .share-hint {
        font-size: 0.75rem;
    }

    .setting-group {
        margin-bottom: var(--space-sm);
    }

    .setting-label {
        font-size: 0.85rem;
    }

    .setting-value {
        font-size: 1rem;
    }

    .toggle-label {
        font-size: 0.85rem;
    }

    .toggle-text {
        font-size: 0.85rem;
    }

    .tip-card {
        padding: var(--space-sm);
        margin: var(--space-md) 0;
    }

    .tip-icon {
        font-size: 1.25rem;
    }

    .tip-text {
        font-size: 0.85rem;
    }

    .footer {
        padding: var(--space-md);
    }

    .footer-text {
        font-size: 0.75rem;
        flex-direction: column;
        gap: var(--space-xs);
    }

    .kbd-hint {
        font-size: 0.7rem;
    }

    kbd {
        padding: 0.15rem 0.35rem;
        font-size: 0.65rem;
    }

    .modal-content {
        padding: var(--space-lg);
        width: 95%;
        max-width: 400px;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-body p {
        font-size: 0.9rem;
    }

    .modal-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
    }
}

/* Extra Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .logo {
        font-size: 1.25rem;
    }

    .timer-wrapper {
        width: 220px;
        height: 220px;
    }

    .timer-display {
        font-size: 2.25rem;
    }

    .control-btn {
        min-width: 80px;
        max-width: 95px;
        font-size: 0.7rem;
        padding: 0.5rem;
    }

    .badges-grid {
        grid-template-columns: 1fr 1fr;
    }

    .session-stats {
        justify-content: space-between;
    }

    .stat-item {
        min-width: 60px;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {

    .theme-toggle,
    .sakura-container,
    .share-section,
    .footer {
        display: none !important;
    }
}