/* CSS Variables for Theming */
:root {
    /* Background colors */
    --bg-primary: #1e1e2e;
    --bg-secondary: #2d2d44;

    /* Text colors */
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-time: rgba(255, 255, 255, 0.7);

    /* Ring background */
    --ring-bg: rgba(128, 128, 128, 0.2);

    /* Hour ring colors */
    --ring-hour-start: #667eea;
    --ring-hour-mid: #764ba2;
    --ring-hour-end: #9333ea;

    /* Minute ring colors */
    --ring-minute-start: #f093fb;
    --ring-minute-mid: #f5576c;
    --ring-minute-end: #ff6b81;

    /* Second ring colors */
    --ring-second-start: #4facfe;
    --ring-second-mid: #00f2fe;
    --ring-second-end: #40e0d0;

    /* Millisecond ring colors */
    --ring-ms-start: #43e97b;
    --ring-ms-mid: #38f9d7;
    --ring-ms-end: #7fffd4;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    overflow: hidden;
    transition: background 0.5s ease;
}

/* Container */
.container {
    width: 100%;
    height: 100%;
    max-width: 600px;
    max-height: calc(100vh - 40px);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Clock wrapper */
.clock-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: min(500px, 90vw, calc(90vh - 120px));
    max-height: min(500px, 90vw, calc(90vh - 120px));
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG Rings - clean container */
.rings {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg); /* Start from top */
}

/* Ring background (track) - thin orbit-like appearance */
.ring-bg {
    fill: none;
    stroke: var(--ring-bg);
    stroke-width: 0.5;
    stroke-linecap: round;
    transition: stroke 0.3s ease;
}

/* Arc segments - individual comet fragments */
.arc-segment {
    /* Clean, no glow */
    transition: opacity 0.05s ease-out;
}

/* Alarm markers on rings */
.alarm-marker {
    fill: none;
    stroke: #ff6b81;
    stroke-width: 3;
    stroke-linecap: round;
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(255, 107, 129, 1)) drop-shadow(0 0 4px rgba(255, 107, 129, 0.8));
    transition: opacity 0.3s ease;
}

.alarm-marker-dot {
    fill: #ff6b81;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 1;
    filter: drop-shadow(0 0 12px rgba(255, 107, 129, 1))
            drop-shadow(0 0 6px rgba(255, 107, 129, 0.8))
            drop-shadow(0 0 3px rgba(255, 255, 255, 0.6));
    animation: alarmPulse 2s ease-in-out infinite;
}

@keyframes alarmPulse {
    0%, 100% {
        opacity: 0.85;
        filter: drop-shadow(0 0 12px rgba(255, 107, 129, 1))
                drop-shadow(0 0 6px rgba(255, 107, 129, 0.8))
                drop-shadow(0 0 3px rgba(255, 255, 255, 0.6));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 16px rgba(255, 107, 129, 1))
                drop-shadow(0 0 10px rgba(255, 107, 129, 0.9))
                drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
    }
}

/* Time labels overlay */
.time-labels {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    text-align: center;
    pointer-events: none;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.time-value {
    font-size: clamp(0.9rem, 3vmin, 1.5rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}

.time-label {
    font-size: clamp(0.45rem, 1.3vmin, 0.65rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

/* Accessible text time display */
.text-time {
    position: absolute;
    bottom: clamp(-50px, -12vmin, -60px);
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(0.8rem, 2.5vmin, 1.2rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--text-time);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: color 0.3s ease;
}

/* Time-based Greeting */
.greeting-container {
    position: absolute;
    bottom: clamp(-90px, -20vmin, -100px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.greeting-container:hover {
    opacity: 1;
}

.greeting-text {
    font-size: clamp(0.75rem, 2vmin, 0.95rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--text-time);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.greeting-emoji {
    font-size: clamp(0.85rem, 2.2vmin, 1.1rem);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Fade-in animation for greeting */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 0.85;
        transform: translateY(0);
    }
}

/* Streak Counter */
.streak-container {
    position: absolute;
    bottom: clamp(-120px, -26vmin, -130px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 107, 129, 0.1);
    border: 1px solid rgba(255, 107, 129, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.streak-container:hover {
    opacity: 1;
    transform: translateX(-50%) scale(1.05);
    background: rgba(255, 107, 129, 0.15);
}

.streak-fire {
    font-size: clamp(1rem, 2.5vmin, 1.2rem);
    filter: drop-shadow(0 2px 4px rgba(255, 107, 129, 0.5));
}

.streak-number {
    font-size: clamp(1rem, 2.5vmin, 1.2rem);
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.streak-label {
    font-size: clamp(0.7rem, 1.8vmin, 0.85rem);
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

/* Streak pulse animation */
@keyframes streakPulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.15);
    }
}

/* Milestone Modal */
.milestone-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.milestone-modal.active {
    opacity: 1;
}

.milestone-content {
    background: linear-gradient(135deg, rgba(255, 107, 129, 0.2) 0%, rgba(255, 64, 129, 0.2) 100%);
    border: 2px solid rgba(255, 107, 129, 0.5);
    border-radius: 24px;
    padding: 48px 32px;
    text-align: center;
    max-width: 400px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(255, 107, 129, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.milestone-modal.active .milestone-content {
    transform: scale(1);
}

.milestone-fire {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: milestoneFirePulse 1.5s ease infinite;
}

@keyframes milestoneFirePulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 4px 12px rgba(255, 107, 129, 0.5));
    }
    50% {
        transform: scale(1.2);
        filter: drop-shadow(0 6px 20px rgba(255, 107, 129, 0.8));
    }
}

.milestone-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.milestone-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.milestone-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, rgba(255, 107, 129, 0.3) 0%, rgba(255, 64, 129, 0.3) 100%);
    border: 2px solid rgba(255, 107, 129, 0.5);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.milestone-btn:hover {
    background: linear-gradient(135deg, rgba(255, 107, 129, 0.4) 0%, rgba(255, 64, 129, 0.4) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 129, 0.4);
}

/* Responsive adjustments */
@media (max-height: 400px) {
    .streak-container {
        display: none;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        max-width: 90vw;
    }

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

    .time-label {
        font-size: 0.55rem;
    }

    .text-time {
        font-size: 1rem;
        bottom: -50px;
    }

    .ring-bg {
        stroke-width: 0.5;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .time-labels {
        gap: 12px;
    }
}

/* Height-based responsive adjustments */
@media (max-height: 700px) {
    .container {
        padding: 15px;
    }

    .time-labels {
        gap: 15px;
    }
}

@media (max-height: 600px) {
    .container {
        padding: 10px;
        max-height: calc(100vh - 20px);
    }

    .clock-wrapper {
        max-width: min(400px, 85vw, calc(85vh - 100px));
        max-height: min(400px, 85vw, calc(85vh - 100px));
    }

    .time-labels {
        gap: 10px;
    }

    .text-time {
        font-size: clamp(0.7rem, 2vmin, 1rem);
        bottom: clamp(-40px, -10vmin, -50px);
    }
}

@media (max-height: 500px) {
    .container {
        padding: 5px;
        max-height: calc(100vh - 10px);
    }

    .clock-wrapper {
        max-width: min(300px, 75vw, calc(75vh - 80px));
        max-height: min(300px, 75vw, calc(75vh - 80px));
    }

    .time-labels {
        gap: 6px;
    }

    .text-time {
        font-size: clamp(0.65rem, 1.8vmin, 0.85rem);
        bottom: clamp(-35px, -8vmin, -40px);
    }

    .fullscreen-btn,
    .settings-btn,
    .alarm-btn,
    .world-clock-btn,
    .stopwatch-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

/* Very short heights - hide text time */
@media (max-height: 400px) {
    .container {
        padding: 5px;
        max-height: calc(100vh - 10px);
    }

    .clock-wrapper {
        max-width: min(250px, 70vw, calc(70vh - 60px));
        max-height: min(250px, 70vw, calc(70vh - 60px));
    }

    .text-time {
        display: none;
    }

    .greeting-container {
        display: none;
    }

    .time-labels {
        gap: 5px;
    }

    .fullscreen-btn,
    .settings-btn,
    .alarm-btn,
    .world-clock-btn,
    .stopwatch-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 12px;
    }

    /* Extra tight spacing on very short screens */
    .fullscreen-btn {
        transform: translateX(-100px);
    }

    .fullscreen-btn:hover {
        transform: translateX(-100px) scale(1.05);
    }

    .alarm-btn {
        transform: translateX(-50px);
    }

    .alarm-btn:hover {
        transform: translateX(-50px) scale(1.05);
    }

    .world-clock-btn {
        transform: translateX(0);
    }

    .world-clock-btn:hover {
        transform: translateX(0) scale(1.05);
    }

    .stopwatch-btn {
        transform: translateX(50px);
    }

    .stopwatch-btn:hover {
        transform: translateX(50px) scale(1.05);
    }

    .settings-btn {
        transform: translateX(100px);
    }

    .settings-btn:hover {
        transform: translateX(100px) rotate(0deg) scale(1.05);
    }

    .container {
        padding-bottom: 70px;
    }
}

/* Accessibility - reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .arc-segment {
        transition: none;
    }

    .rings {
        filter: drop-shadow(0 0 15px rgba(100, 126, 234, 0.3));
    }
}

/* Fullscreen Button */
.fullscreen-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Desktop only hover effect */
@media (min-width: 769px) and (min-height: 601px) {
    .fullscreen-btn:hover {
        transform: scale(1.1);
    }
}

.fullscreen-btn:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* Settings Button */
.settings-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Desktop only hover effect */
@media (min-width: 769px) and (min-height: 601px) {
    .settings-btn:hover {
        transform: rotate(90deg);
    }
}

.settings-btn:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

.settings-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Settings Modal */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.settings-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.settings-panel {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.95) 0%, rgba(45, 45, 68, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

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

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

.settings-title {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.close-btn:focus {
    outline: 2px solid var(--text-primary);
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-label {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: block;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.theme-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.theme-option.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-option:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

.theme-preview {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-bottom: 8px;
}

.theme-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.theme-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Premium Themes Section */
.premium-pack-section {
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.premium-pack-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.premium-pack-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px 0;
}

.pack-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pack-price {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.buy-pack-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2) 0%, rgba(56, 249, 215, 0.2) 100%);
    border: 2px solid rgba(67, 233, 123, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-pack-btn:hover {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.3) 0%, rgba(56, 249, 215, 0.3) 100%);
    border-color: rgba(67, 233, 123, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.3);
}

.buy-pack-btn:active {
    transform: translateY(0);
}

.buy-pack-btn.purchased {
    background: rgba(67, 233, 123, 0.3);
    border-color: rgba(67, 233, 123, 0.5);
    cursor: not-allowed;
    opacity: 0.8;
}

.buy-pack-btn.purchased:hover {
    transform: none;
    box-shadow: none;
}

/* Purchase Success Modal */
.purchase-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.purchase-success-modal.active {
    opacity: 1;
}

.purchase-success-content {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.95) 0%, rgba(30, 30, 46, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 48px 40px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
}

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

.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2) 0%, rgba(56, 249, 215, 0.2) 100%);
    border: 3px solid rgba(67, 233, 123, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: rgba(67, 233, 123, 1);
    animation: checkmarkPulse 0.6s ease;
}

@keyframes checkmarkPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.purchase-success-content h2 {
    margin: 0 0 16px;
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.purchase-success-content p {
    margin: 8px 0;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.purchase-success-content .success-subtitle {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 32px;
}

.explore-themes-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.3) 0%, rgba(56, 249, 215, 0.3) 100%);
    border: 2px solid rgba(67, 233, 123, 0.5);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.explore-themes-btn:hover {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.4) 0%, rgba(56, 249, 215, 0.4) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 233, 123, 0.4);
}

.explore-themes-btn:active {
    transform: translateY(0);
}

/* Payment Loading Spinner */
.payment-loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-loading-spinner.active {
    opacity: 1;
}

.spinner-content {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid rgba(67, 233, 123, 0.2);
    border-top: 4px solid rgba(67, 233, 123, 1);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-content p {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Error Toast Notification */
.error-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.95) 0%, rgba(192, 57, 43, 0.95) 100%);
    border: 1px solid rgba(231, 76, 60, 0.5);
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(231, 76, 60, 0.4);
    z-index: 10002;
    max-width: 90%;
    transition: all 0.3s ease;
}

.error-toast.active {
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-message {
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Newly Unlocked Theme Highlight Animation */
.theme-option.newly-unlocked {
    animation: unlockPulse 0.6s ease;
    box-shadow: 0 0 20px rgba(67, 233, 123, 0.6);
}

@keyframes unlockPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(67, 233, 123, 0.6);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(67, 233, 123, 0.8);
    }
}

.premium-theme-grid {
    margin-top: 8px;
}

/* Locked theme styles */
.theme-option.locked {
    opacity: 0.7;
    cursor: not-allowed;
}

.theme-option.locked:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-preview {
    position: relative;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.lock-icon {
    font-size: 24px;
    opacity: 0.9;
}

/* Share URL Button */
.share-url-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-url-btn:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.share-url-btn:active {
    transform: translateY(0);
}

.share-url-btn:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

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

.share-text {
    font-family: inherit;
}

.share-hint {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Time Format Toggle */
.format-toggle {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.format-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.format-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.format-btn.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.format-btn:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* Animation Speed Control */
.speed-control {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}

.speed-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

.speed-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    outline: none;
    cursor: pointer;
}

.speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    border: 2px solid var(--text-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transition: all 0.2s ease;
}

.speed-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
}

.speed-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    border: 2px solid var(--text-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transition: all 0.2s ease;
}

.speed-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
}

.speed-value {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Auto Theme Toggle */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: 0.3s;
    border-radius: 26px;
}

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

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

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

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 30px;
}

.auto-theme-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.4;
}

/* Focus Stats */
.focus-stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.stat-item {
    text-align: center;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.focus-stats-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
    line-height: 1.4;
}

/* Responsive - Button Container for Mobile */
@media (max-width: 768px), (max-height: 600px) {
    /* Move all buttons to bottom on small screens */
    .fullscreen-btn,
    .settings-btn,
    .alarm-btn,
    .world-clock-btn,
    .stopwatch-btn {
        position: fixed;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: 20px;
        width: 52px;
        height: 52px;
        z-index: 150;
    }

    .fullscreen-btn {
        left: 50%;
        transform: translateX(-130px);
    }

    .fullscreen-btn:hover {
        transform: translateX(-130px) scale(1.05);
    }

    .alarm-btn {
        left: 50%;
        transform: translateX(-65px);
    }

    .alarm-btn:hover {
        transform: translateX(-65px) scale(1.05);
    }

    .world-clock-btn {
        left: 50%;
        transform: translateX(0);
    }

    .world-clock-btn:hover {
        transform: translateX(0) scale(1.05);
    }

    .stopwatch-btn {
        left: 50%;
        transform: translateX(65px);
    }

    .stopwatch-btn:hover {
        transform: translateX(65px) scale(1.05);
    }

    .settings-btn {
        left: 50%;
        transform: translateX(130px);
    }

    .settings-btn:hover {
        transform: translateX(130px) rotate(0deg) scale(1.05);
    }

    /* Adjust clock position to avoid bottom buttons */
    .container {
        padding-bottom: 100px;
    }
}

/* Responsive adjustments for settings */
@media (max-width: 768px) {
    .settings-panel {
        padding: 30px 20px;
    }

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

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

@media (max-width: 480px) {
    .fullscreen-btn,
    .alarm-btn,
    .world-clock-btn,
    .stopwatch-btn,
    .settings-btn {
        width: 48px;
        height: 48px;
        bottom: 16px;
    }

    /* Tighter spacing on very small screens */
    .fullscreen-btn {
        transform: translateX(-120px);
    }

    .fullscreen-btn:hover {
        transform: translateX(-120px) scale(1.05);
    }

    .alarm-btn {
        transform: translateX(-60px);
    }

    .alarm-btn:hover {
        transform: translateX(-60px) scale(1.05);
    }

    .world-clock-btn {
        transform: translateX(0);
    }

    .world-clock-btn:hover {
        transform: translateX(0) scale(1.05);
    }

    .stopwatch-btn {
        transform: translateX(60px);
    }

    .stopwatch-btn:hover {
        transform: translateX(60px) scale(1.05);
    }

    .settings-btn {
        transform: translateX(120px);
    }

    .settings-btn:hover {
        transform: translateX(120px) rotate(0deg) scale(1.05);
    }

    .container {
        padding-bottom: 90px;
    }

    .settings-panel {
        padding: 24px 16px;
    }

    .settings-title {
        font-size: 1.3rem;
    }
}

/* Fullscreen Hint */
.fullscreen-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    padding: 20px 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 200;
}

.fullscreen-hint.active {
    opacity: 1;
}

.hint-text {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hint-text kbd {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    font-family: monospace;
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ==================== ALARM SYSTEM ==================== */

/* Alarm Button */
.alarm-btn {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.alarm-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Desktop only hover effect */
@media (min-width: 769px) and (min-height: 601px) {
    .alarm-btn:hover {
        transform: scale(1.1);
    }
}

.alarm-btn:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* Alarm Modal */
.alarm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.alarm-modal.active {
    display: flex;
}

.alarm-panel {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.95) 0%, rgba(45, 45, 68, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: calc(100% - 40px);
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

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

.alarm-title {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text-primary);
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    color: var(--text-primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ring-hour-start), var(--ring-minute-start));
}

.tab-btn:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* Tab Panels */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Notification Permission */
.notification-permission {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.permission-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.permission-btn {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.3), rgba(255, 152, 0, 0.3));
    border: 1px solid rgba(255, 193, 7, 0.5);
    border-radius: 8px;
    padding: 10px 20px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.permission-btn:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.4), rgba(255, 152, 0, 0.4));
    transform: translateY(-2px);
}

/* Time Picker */
.time-picker,
.timer-input-section {
    margin-bottom: 24px;
}

.picker-label {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: block;
}

.time-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.time-input {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 14px 12px;
    width: 70px;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 300;
    text-align: center;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.time-input:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    transform: translateY(-1px);
}

.time-input:focus {
    outline: none;
    border-color: var(--ring-hour-start);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.05));
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

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

.time-separator {
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: 300;
}

/* Repeat Options */
.repeat-options {
    margin: 20px 0;
}

.repeat-label {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
}

.repeat-select {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.repeat-select:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border-color: rgba(255, 255, 255, 0.25);
}

.repeat-select:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.repeat-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Custom Days Picker */
.custom-days {
    margin: 20px 0;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day-checkbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

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

.day-checkbox span {
    width: 100%;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.day-checkbox:hover span {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.day-checkbox input[type="checkbox"]:checked + span {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    border-color: rgba(102, 126, 234, 0.6);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.add-alarm-btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.35), rgba(118, 75, 162, 0.35));
    border: 1px solid rgba(102, 126, 234, 0.6);
    border-radius: 16px;
    padding: 16px 24px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.add-alarm-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.add-alarm-btn:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.5), rgba(118, 75, 162, 0.5));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.add-alarm-btn:hover::before {
    left: 100%;
}

.add-alarm-btn:active {
    transform: translateY(0);
}

.add-alarm-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3), 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Alarm List */
.alarm-list {
    margin-top: 24px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 32px 16px;
}

.alarm-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.alarm-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.alarm-item.disabled {
    opacity: 0.4;
    filter: grayscale(0.5);
}

.alarm-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alarm-time {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.alarm-repeat {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.alarm-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alarm-toggle {
    position: relative;
    width: 52px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.alarm-toggle.active {
    background: linear-gradient(135deg, var(--ring-hour-start), var(--ring-minute-start));
    border-color: var(--ring-hour-start);
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.alarm-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.alarm-toggle.active::after {
    left: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.alarm-delete {
    background: rgba(255, 107, 129, 0.2);
    border: 1px solid rgba(255, 107, 129, 0.4);
    border-radius: 10px;
    padding: 8px 14px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(255, 107, 129, 0.15);
}

.alarm-delete:hover {
    background: rgba(255, 107, 129, 0.35);
    border-color: rgba(255, 107, 129, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 129, 0.3);
}

.alarm-delete:active {
    transform: translateY(0);
}

/* Timer Controls */
.timer-controls {
    display: flex;
    gap: 12px;
    margin: 24px 0;
}

.timer-btn {
    flex: 1;
    border-radius: 14px;
    padding: 16px 24px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid;
    position: relative;
    overflow: hidden;
}

.start-btn {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.35), rgba(56, 249, 215, 0.35));
    border-color: rgba(67, 233, 123, 0.6);
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.2);
}

.start-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.5), rgba(56, 249, 215, 0.5));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 233, 123, 0.4);
}

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

.reset-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.reset-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.timer-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* Timer Display */
.timer-display {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.timer-time {
    font-size: 3rem;
    font-weight: 200;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.05em;
}

.timer-progress {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.timer-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--ring-hour-start), var(--ring-minute-start), var(--ring-second-start));
    border-radius: 10px;
    transition: width 0.5s linear;
    width: 0%;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* Responsive - Alarm Button */
@media (max-height: 500px) {
    .alarm-btn {
        font-size: 1.2rem;
    }
}

@media (max-height: 400px) {
    .alarm-btn {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .alarm-panel {
        padding: 24px 20px;
        width: calc(100% - 32px);
        max-width: 420px;
        max-height: 90vh;
    }

    .alarm-title {
        font-size: 1.4rem;
    }

    .alarm-header {
        margin-bottom: 20px;
    }

    .tab-nav {
        margin-bottom: 20px;
    }

    .time-input {
        width: 60px;
        font-size: 1.3rem;
        padding: 10px;
    }

    .alarm-time {
        font-size: 1.5rem;
    }

    .timer-time {
        font-size: 2.5rem;
    }

    .timer-display {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .alarm-panel {
        padding: 20px 16px;
        width: calc(100% - 24px);
        border-radius: 16px;
    }

    .alarm-title {
        font-size: 1.3rem;
    }

    .time-input {
        width: 54px;
        font-size: 1.2rem;
        padding: 8px;
    }

    .alarm-time {
        font-size: 1.3rem;
    }

    .timer-time {
        font-size: 2rem;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* ==================== WORLD CLOCK SYSTEM ==================== */

/* World Clock Button */
.world-clock-btn {
    position: fixed;
    top: 140px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.world-clock-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

/* Desktop only hover effect */
@media (min-width: 769px) and (min-height: 601px) {
    .world-clock-btn:hover {
        transform: scale(1.1);
    }
}

/* Desktop only active effect */
@media (min-width: 769px) and (min-height: 601px) {
    .world-clock-btn:active {
        transform: scale(1);
    }
}

/* World Clock Modal */
.world-clock-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: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.world-clock-modal.show {
    display: flex;
}

.world-clock-panel {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.98) 0%, rgba(45, 45, 68, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* World Clock Header */
.world-clock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.world-clock-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Add City Section */
.add-city-section {
    margin-bottom: 32px;
}

.city-picker {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.city-select {
    flex: 1;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.city-select:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.city-select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--ring-hour-start);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.city-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.add-city-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--ring-hour-start) 0%, var(--ring-hour-mid) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.add-city-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.add-city-btn:active {
    transform: translateY(0);
}

.add-city-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* World Clock List */
.world-clock-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 40px 20px;
}

/* Clock Card */
.clock-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

.clock-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.clock-info {
    flex: 1;
}

.clock-city {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.clock-time {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    margin-bottom: 2px;
}

.clock-date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.clock-offset {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.clock-actions {
    display: flex;
    gap: 8px;
}

.delete-clock-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 107, 129, 0.1);
    border: 1px solid rgba(255, 107, 129, 0.2);
    color: #ff6b81;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.delete-clock-btn:hover {
    background: rgba(255, 107, 129, 0.2);
    transform: scale(1.1);
}

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

/* Responsive Design for World Clock */
@media (max-width: 768px) {
    .world-clock-panel {
        width: 95%;
        padding: 24px 20px;
    }

    .world-clock-title {
        font-size: 1.5rem;
    }

    .city-picker {
        flex-direction: column;
    }

    .clock-time {
        font-size: 1.5rem;
    }

    .clock-city {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .world-clock-btn {
        font-size: 1.3rem;
    }

    .world-clock-panel {
        padding: 20px 16px;
        width: calc(100% - 24px);
        border-radius: 16px;
    }

    .world-clock-title {
        font-size: 1.3rem;
    }

    .clock-time {
        font-size: 1.3rem;
    }

    .clock-card {
        padding: 16px 18px;
    }
}

/* Day/Night Indicator */
.clock-day-night-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.5rem;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.clock-day-night-indicator.morning {
    filter: drop-shadow(0 2px 8px rgba(255, 200, 100, 0.4));
}

.clock-day-night-indicator.day {
    filter: drop-shadow(0 2px 8px rgba(255, 220, 50, 0.5));
}

.clock-day-night-indicator.evening {
    filter: drop-shadow(0 2px 8px rgba(255, 100, 150, 0.4));
}

.clock-day-night-indicator.night {
    filter: drop-shadow(0 2px 8px rgba(100, 150, 255, 0.4));
}

/* Time Zone Converter Section */
.timezone-converter-section {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.converter-inputs {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.converter-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.converter-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.converter-select {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.converter-select:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.converter-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.converter-time-input {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.converter-time-input:hover {
    background: rgba(255, 255, 255, 0.12);
}

.converter-time-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.converter-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-top: 24px;
}

.converted-time {
    padding: 12px;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.15), rgba(56, 249, 215, 0.1));
    border: 1px solid rgba(67, 233, 123, 0.25);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.converter-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px;
}

/* Meeting Time Finder Section */
.meeting-finder-section {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.meeting-cities-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.meeting-city-select {
    flex: 1;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.add-meeting-city-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2), rgba(56, 249, 215, 0.15));
    border: 1px solid rgba(67, 233, 123, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-meeting-city-btn:hover {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.3), rgba(56, 249, 215, 0.2));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.3);
}

.meeting-cities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.empty-meeting-state {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

.meeting-city-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 0.85rem;
}

.remove-meeting-city {
    background: rgba(255, 107, 129, 0.2);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.remove-meeting-city:hover {
    background: rgba(255, 107, 129, 0.4);
    transform: scale(1.1);
}

.meeting-suggestions {
    margin-top: 16px;
}

.suggestions-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.suggestion-card {
    padding: 16px;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.1), rgba(56, 249, 215, 0.05));
    border: 1px solid rgba(67, 233, 123, 0.2);
    border-radius: 12px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.suggestion-rank {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(67, 233, 123, 0.8);
    min-width: 40px;
}

.suggestion-times {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.suggestion-time-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.suggestion-city {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.suggestion-time {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.suggestion-score {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Responsive Design for World Clock Enhancements */
@media (max-width: 768px) {
    .converter-inputs {
        flex-direction: column;
    }

    .converter-arrow {
        margin: 0;
        transform: rotate(90deg);
    }

    .meeting-cities-selector {
        flex-direction: column;
    }

    .suggestion-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .suggestion-rank {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .timezone-converter-section,
    .meeting-finder-section {
        padding: 16px;
    }

    .converter-time-input,
    .converter-select,
    .meeting-city-select {
        font-size: 0.85rem;
        padding: 8px 10px;
    }

    .converted-time {
        font-size: 1rem;
    }

    .suggestion-time-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}

/* ==================== STOPWATCH SYSTEM ==================== */

/* Stopwatch Button */
.stopwatch-btn {
    position: fixed;
    top: 200px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stopwatch-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

/* Desktop only hover effect */
@media (min-width: 769px) and (min-height: 601px) {
    .stopwatch-btn:hover {
        transform: scale(1.1);
    }
}

/* Desktop only active effect */
@media (min-width: 769px) and (min-height: 601px) {
    .stopwatch-btn:active {
        transform: scale(1);
    }
}

.stopwatch-btn:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* Focus Mode Button */
.focus-btn {
    position: fixed;
    top: 150px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.focus-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.focus-btn.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.3);
}

@media (min-width: 769px) and (min-height: 601px) {
    .focus-btn:hover {
        transform: scale(1.1);
    }

    .focus-btn:active {
        transform: scale(1);
    }
}

.focus-btn:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* Sound Button */
.sound-btn {
    position: fixed;
    top: 200px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.sound-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.sound-btn.playing {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.3) 0%, rgba(56, 249, 215, 0.3) 100%);
    border-color: rgba(67, 233, 123, 0.5);
    box-shadow: 0 6px 24px rgba(67, 233, 123, 0.3);
    animation: pulse 2s ease infinite;
}

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

@media (min-width: 769px) and (min-height: 601px) {
    .sound-btn:hover {
        transform: scale(1.1);
    }

    .sound-btn:active {
        transform: scale(1);
    }
}

.sound-btn:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* Focus Session Info */
.focus-session-info {
    position: absolute;
    top: clamp(40px, 12vmin, 60px);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0.9;
}

.focus-timer {
    font-size: clamp(1.2rem, 3.5vmin, 1.8rem);
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 4px;
}

.focus-label {
    font-size: clamp(0.7rem, 1.8vmin, 0.85rem);
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Ambient Sound Modal */
.sound-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: 1000;
    align-items: center;
    justify-content: center;
}

.sound-modal.active {
    display: flex;
}

.sound-panel {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 32px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.sound-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Sound Categories */
.sound-categories {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sound-category {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.sound-category:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sound-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.sound-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.sound-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sound-icon {
    font-size: 2rem;
    margin-bottom: 4px;
}

.sound-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

.sound-play-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border: 1px solid rgba(102, 126, 234, 0.5);
    color: var(--text-primary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sound-play-btn:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.5) 0%, rgba(118, 75, 162, 0.5) 100%);
    transform: scale(1.1);
}

.sound-play-btn.playing {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.3) 0%, rgba(56, 249, 215, 0.3) 100%);
    border-color: rgba(67, 233, 123, 0.5);
}

/* Volume Control */
.sound-controls {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.volume-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.volume-icon {
    font-size: 1.2rem;
    opacity: 0.7;
}

.volume-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.volume-value {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Now Playing */
.now-playing {
    margin-top: 20px;
    padding: 16px;
    background: rgba(67, 233, 123, 0.1);
    border: 1px solid rgba(67, 233, 123, 0.3);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.now-playing-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.now-playing-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.now-playing-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stop-btn {
    padding: 8px 16px;
    background: rgba(255, 107, 129, 0.2);
    border: 1px solid rgba(255, 107, 129, 0.4);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stop-btn:hover {
    background: rgba(255, 107, 129, 0.3);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .sound-panel {
        padding: 24px 20px;
        width: calc(100% - 32px);
        max-width: 420px;
        max-height: 90vh;
    }

    .sound-title {
        font-size: 1.4rem;
    }

    .sound-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .sound-card {
        padding: 12px;
    }

    .sound-icon {
        font-size: 1.6rem;
    }

    .sound-name {
        font-size: 0.8rem;
    }
}

/* Stopwatch Modal */
.stopwatch-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: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.stopwatch-modal.show {
    display: flex;
}

.stopwatch-panel {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.98) 0%, rgba(45, 45, 68, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 36px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Stopwatch Header */
.stopwatch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
}

.stopwatch-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Stopwatch Display */
.stopwatch-display {
    text-align: center;
    padding: 48px 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.stopwatch-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.05), transparent 70%);
    pointer-events: none;
}

.stopwatch-time {
    font-size: 3.5rem;
    font-weight: 200;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
}

/* Stopwatch Controls */
.stopwatch-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.stopwatch-control-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 16px;
    border-radius: 16px;
    border: 1px solid;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stopwatch-control-btn .btn-icon {
    font-size: 1.8rem;
}

.stopwatch-control-btn .btn-text {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stopwatch-control-btn.start-btn {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.35), rgba(56, 249, 215, 0.35));
    border-color: rgba(67, 233, 123, 0.6);
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.2);
}

.stopwatch-control-btn.start-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.5), rgba(56, 249, 215, 0.5));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 233, 123, 0.4);
}

.stopwatch-control-btn.start-btn.running {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.35), rgba(255, 152, 0, 0.35));
    border-color: rgba(255, 193, 7, 0.6);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.stopwatch-control-btn.start-btn.running:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.5), rgba(255, 152, 0, 0.5));
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.stopwatch-control-btn.lap-btn {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.35), rgba(118, 75, 162, 0.35));
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.stopwatch-control-btn.lap-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.5), rgba(118, 75, 162, 0.5));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.stopwatch-control-btn.reset-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.stopwatch-control-btn.reset-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.stopwatch-control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* Lap Times Section */
.lap-times-section {
    margin-top: 32px;
}

.lap-times-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.lap-times-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Custom scrollbar for lap times */
.lap-times-list::-webkit-scrollbar {
    width: 6px;
}

.lap-times-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.lap-times-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.lap-times-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lap-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideIn 0.3s ease-out;
}

.lap-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    transform: translateX(4px);
}

.lap-item.fastest {
    border-color: rgba(67, 233, 123, 0.5);
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.15), rgba(56, 249, 215, 0.1));
}

.lap-item.slowest {
    border-color: rgba(255, 107, 129, 0.5);
    background: linear-gradient(135deg, rgba(255, 107, 129, 0.15), rgba(255, 85, 100, 0.1));
}

.lap-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lap-number {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lap-split {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.lap-total {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* Responsive Design for Stopwatch */
@media (max-width: 768px) {
    .stopwatch-panel {
        width: 95%;
        padding: 28px 24px;
    }

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

    .stopwatch-time {
        font-size: 2.8rem;
    }

    .stopwatch-display {
        padding: 36px 20px;
    }

    .lap-total {
        font-size: 1.2rem;
    }

    .lap-split {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .stopwatch-btn {
        font-size: 1.3rem;
    }

    .stopwatch-panel {
        padding: 24px 20px;
        width: calc(100% - 24px);
        border-radius: 16px;
    }

    .stopwatch-title {
        font-size: 1.3rem;
    }

    .stopwatch-time {
        font-size: 2.2rem;
    }

    .stopwatch-display {
        padding: 28px 16px;
        margin-bottom: 24px;
    }

    .stopwatch-controls {
        gap: 8px;
        margin-bottom: 24px;
    }

    .stopwatch-control-btn {
        padding: 14px 12px;
    }

    .stopwatch-control-btn .btn-icon {
        font-size: 1.5rem;
    }

    .stopwatch-control-btn .btn-text {
        font-size: 0.75rem;
    }

    .lap-item {
        padding: 12px 16px;
    }

    .lap-total {
        font-size: 1.1rem;
    }

    .lap-split {
        font-size: 0.9rem;
    }
}

@media (max-height: 500px) {
    .stopwatch-btn {
        font-size: 1.2rem;
    }
}

@media (max-height: 400px) {
    .stopwatch-btn {
        font-size: 1.1rem;
    }
}

/* ==================== CUSTOM MESSAGE MODAL ==================== */

/* Message Modal */
.message-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: 1000;
    align-items: center;
    justify-content: center;
}

.message-modal.active {
    display: flex;
}

.message-panel {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 32px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.message-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.message-close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.message-close-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.1);
}

/* Message Selector (in Alarm Panel) */
.message-selector {
    margin-bottom: 8px;
}

.message-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.message-select:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

.message-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.message-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 4px 0 0 0;
    font-style: italic;
}

/* Recording Section */
.record-section {
    margin-bottom: 32px;
}

.record-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.record-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.record-btn,
.stop-record-btn {
    flex: 1;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(255, 107, 129, 0.2), rgba(255, 85, 100, 0.15));
    border: 1px solid rgba(255, 107, 129, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.record-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 107, 129, 0.3), rgba(255, 85, 100, 0.2));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 129, 0.3);
}

.stop-record-btn {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2), rgba(56, 249, 215, 0.15));
    border-color: rgba(67, 233, 123, 0.3);
}

.stop-record-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.3), rgba(56, 249, 215, 0.2));
    box-shadow: 0 6px 20px rgba(67, 233, 123, 0.3);
}

.record-btn:disabled,
.stop-record-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Recording Indicator */
.recording-indicator {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 107, 129, 0.15), rgba(255, 85, 100, 0.1));
    border: 1px solid rgba(255, 107, 129, 0.2);
    border-radius: 12px;
}

.recording-pulse {
    width: 12px;
    height: 12px;
    background: #ff6b81;
    border-radius: 50%;
    animation: recordPulse 1.5s ease infinite;
}

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

.recording-time {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ff6b81;
    font-variant-numeric: tabular-nums;
}

/* Preview Section */
.preview-section {
    display: none;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.preview-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.audio-preview {
    width: 100%;
    margin-bottom: 16px;
}

.preview-actions {
    display: flex;
    gap: 12px;
}

.save-message-btn,
.discard-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-message-btn {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2), rgba(56, 249, 215, 0.15));
    border: 1px solid rgba(67, 233, 123, 0.3);
    color: var(--text-primary);
}

.save-message-btn:hover {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.3), rgba(56, 249, 215, 0.2));
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(67, 233, 123, 0.3);
}

.discard-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
}

.discard-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Messages List */
.messages-section {
    margin-bottom: 24px;
}

.messages-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.message-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.message-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    transform: translateX(4px);
}

.message-info {
    flex: 1;
}

.message-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.message-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.message-actions {
    display: flex;
    gap: 8px;
}

.play-message-btn,
.delete-message-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.play-message-btn:hover {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2), rgba(56, 249, 215, 0.15));
    border-color: rgba(67, 233, 123, 0.3);
    transform: scale(1.1);
}

.delete-message-btn:hover {
    background: linear-gradient(135deg, rgba(255, 107, 129, 0.2), rgba(255, 85, 100, 0.15));
    border-color: rgba(255, 107, 129, 0.3);
    transform: scale(1.1);
}

/* Premium Notice */
.message-premium-notice {
    display: none;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 193, 7, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 24px;
}

.premium-notice-content {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.premium-notice-icon {
    font-size: 2.5rem;
}

.premium-notice-text {
    flex: 1;
}

.premium-notice-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.premium-notice-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.message-upgrade-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 193, 7, 0.2));
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.message-upgrade-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4), rgba(255, 193, 7, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

/* Responsive Design for Message Modal */
@media (max-width: 768px) {
    .message-panel {
        width: 95%;
        padding: 28px 24px;
    }

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

    .record-controls {
        flex-direction: column;
    }

    .record-btn,
    .stop-record-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .message-panel {
        padding: 24px 20px;
        width: calc(100% - 24px);
        border-radius: 16px;
    }

    .message-title {
        font-size: 1.3rem;
    }

    .message-item {
        padding: 12px;
    }

    .preview-actions {
        flex-direction: column;
    }
}

/* ==================== THEME RECOMMENDATIONS ==================== */

/* Recommendations Header */
.recommendations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.refresh-recommendations-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-recommendations-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: rotate(180deg);
}

/* Recommendations Container */
.theme-recommendations-container {
    margin-bottom: 12px;
}

.recommendations-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Recommendation Card */
.recommendation-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Theme Preview */
.recommendation-theme-preview {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* Theme preview styles */
.theme-preview-dark {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.theme-preview-light {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.theme-preview-warm {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

.theme-preview-cool {
    background: linear-gradient(135deg, #38f9d7, #43e97b);
}

.theme-preview-sakura {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
}

.theme-preview-deepOcean {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

.theme-preview-sunset {
    background: linear-gradient(135deg, #ff6b6b, #ffa45b);
}

.theme-preview-lavender {
    background: linear-gradient(135deg, #b490ca, #d4a5a5);
}

.theme-preview-neonCity {
    background: linear-gradient(135deg, #f093fb, #4facfe);
}

.theme-preview-mintFresh {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
}

.theme-preview-desertDawn {
    background: linear-gradient(135deg, #fccb90, #d57eeb);
}

.theme-preview-forestMist {
    background: linear-gradient(135deg, #606c88, #3f4c6b);
}

.theme-preview-autumnLeaves {
    background: linear-gradient(135deg, #fa8c16, #fa541c);
}

.theme-preview-arcticAurora {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* Professional Pack Theme Previews */
.theme-preview-corporateBlue {
    background: linear-gradient(135deg, #1e3a8a, #2563eb, #60a5fa);
}

.theme-preview-executiveGray {
    background: linear-gradient(135deg, #374151, #6b7280, #9ca3af);
}

.theme-preview-businessGreen {
    background: linear-gradient(135deg, #065f46, #059669, #10b981);
}

.theme-preview-presentationDark {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
}

.theme-preview-officeNeutral {
    background: linear-gradient(135deg, #92815a, #b39e7a, #c9b896);
}

/* Recommendation Info */
.recommendation-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.recommendation-reason {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Try Theme Button */
.try-theme-btn {
    align-self: flex-start;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2), rgba(56, 249, 215, 0.15));
    border: 1px solid rgba(67, 233, 123, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.try-theme-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.3), rgba(56, 249, 215, 0.2));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.3);
}

.try-theme-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Recommendations Hint */
.recommendations-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 4px 0 0 0;
    font-style: italic;
}

/* Responsive Design for Recommendations */
@media (max-width: 768px) {
    .recommendation-card {
        padding: 12px;
    }

    .recommendation-theme-preview {
        width: 50px;
        height: 50px;
    }

    .recommendation-theme-name {
        font-size: 0.95rem;
    }

    .recommendation-reason {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .recommendation-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .recommendation-theme-preview {
        width: 80px;
        height: 80px;
    }

    .try-theme-btn {
        width: 100%;
        align-self: stretch;
    }
}

/* ==================== CIRCADIAN INSIGHTS ==================== */

/* Insights Container */
.circadian-insights-container {
    margin-bottom: 12px;
}

/* Insight Grid */
.insight-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

/* Insight Item */
.insight-item {
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.insight-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.insight-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.insight-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* Insights Premium Notice */
.insights-premium-notice {
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 193, 7, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    text-align: center;
    margin-bottom: 12px;
}

.premium-notice-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-weight: 500;
}

.upgrade-insights-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 193, 7, 0.2));
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-insights-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4), rgba(255, 193, 7, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

/* Insights Hint */
.insights-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 4px 0 0 0;
    font-style: italic;
}

/* Responsive Design for Insights */
@media (max-width: 768px) {
    .insight-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .insight-item {
        padding: 12px;
    }

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

    .insight-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .insight-grid {
        grid-template-columns: 1fr;
    }

    .insight-item {
        padding: 14px;
    }
}

/* ========================================
   ANALYTICS DASHBOARD
   ======================================== */

/* Analytics Dashboard Modal */
.analytics-dashboard-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.analytics-dashboard-modal.active {
    display: flex;
    opacity: 1;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
}

.analytics-dashboard-content {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.98), rgba(45, 45, 68, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 0;
    max-width: 1200px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.analytics-dashboard-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.98), rgba(45, 45, 68, 0.98));
    backdrop-filter: blur(20px);
    padding: 28px 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    border-radius: 24px 24px 0 0;
}

.analytics-dashboard-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.analytics-dashboard-body {
    padding: 32px 36px;
}

/* Analytics Section */
.analytics-section {
    margin-bottom: 40px;
}

.analytics-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(67, 233, 123, 0.3);
}

/* Overview Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.1), rgba(56, 249, 215, 0.05));
    border: 1px solid rgba(67, 233, 123, 0.2);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(67, 233, 123, 0.2);
    border-color: rgba(67, 233, 123, 0.4);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Conversion Funnel */
.funnel-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
}

.funnel-step {
    margin-bottom: 20px;
    position: relative;
}

.funnel-step:last-child {
    margin-bottom: 0;
}

.funnel-step-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.funnel-step-count {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.conversion-rate {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.funnel-bar {
    height: 12px;
    background: linear-gradient(90deg, rgba(67, 233, 123, 0.6), rgba(56, 249, 215, 0.4));
    border-radius: 6px;
    transition: width 0.5s ease;
    box-shadow: 0 2px 8px rgba(67, 233, 123, 0.3);
}

.funnel-bar.success {
    background: linear-gradient(90deg, rgba(67, 233, 123, 0.8), rgba(56, 249, 215, 0.6));
    box-shadow: 0 2px 12px rgba(67, 233, 123, 0.5);
}

/* Event Timeline */
.event-timeline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.timeline-event {
    padding: 14px;
    border-left: 3px solid rgba(67, 233, 123, 0.4);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.timeline-event:hover {
    background: rgba(67, 233, 123, 0.1);
    border-left-color: rgba(67, 233, 123, 0.8);
}

.timeline-event:last-child {
    margin-bottom: 0;
}

.timeline-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}

.timeline-event-name {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-event-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Sessions Container */
.sessions-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.session-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px;
    transition: all 0.3s ease;
}

.session-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.session-card.current-session {
    border-color: rgba(67, 233, 123, 0.5);
    background: rgba(67, 233, 123, 0.08);
}

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

.session-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.current-badge {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.3), rgba(56, 249, 215, 0.2));
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(67, 233, 123, 0.4);
}

.session-stats {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.session-stats span {
    font-variant-numeric: tabular-nums;
}

/* Analytics Controls */
.analytics-controls {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.analytics-control-btn {
    flex: 1;
    min-width: 200px;
    padding: 14px 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.analytics-control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.export-btn:hover {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2), rgba(56, 249, 215, 0.15));
    border-color: rgba(67, 233, 123, 0.4);
}

.clear-btn:hover {
    background: linear-gradient(135deg, rgba(255, 107, 129, 0.2), rgba(255, 64, 87, 0.15));
    border-color: rgba(255, 107, 129, 0.4);
}

/* Analytics Button */
.analytics-btn {
    position: fixed;
    top: 128px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(103, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.analytics-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(103, 126, 234, 0.4);
    background: linear-gradient(135deg, rgba(103, 126, 234, 0.5) 0%, rgba(118, 75, 162, 0.5) 100%);
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .analytics-dashboard-content {
        border-radius: 16px;
        max-height: 95vh;
    }

    .analytics-dashboard-header {
        padding: 20px 24px;
    }

    .analytics-dashboard-header h2 {
        font-size: 1.5rem;
    }

    .analytics-dashboard-body {
        padding: 24px 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

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

    .sessions-container {
        grid-template-columns: 1fr;
    }

    .analytics-btn {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .analytics-dashboard-modal.active {
        padding: 20px 10px;
    }

    .analytics-dashboard-header {
        padding: 16px 20px;
    }

    .analytics-dashboard-header h2 {
        font-size: 1.3rem;
    }

    .analytics-dashboard-body {
        padding: 20px 16px;
    }

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

    .analytics-controls {
        flex-direction: column;
    }

    .analytics-control-btn {
        min-width: auto;
        width: 100%;
    }
}
