/* Meditation Overlay */
.meditation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    background: #000;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.meditation-overlay.active {
    display: block;
    opacity: 1;
}

.meditation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Content */
.meditation-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    color: white;
    pointer-events: none;
}

.meditation-overlay .meditation-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white !important;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3), 0 4px 60px rgba(255, 255, 255, 0.2);
    animation: fadeInScale 1s ease;
    letter-spacing: 0.5px;
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: white !important;
}

.meditation-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 3rem;
    opacity: 0.9;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    transition: opacity 0.5s ease;
    animation: fadeIn 1.2s ease 0.3s both;
}

.meditation-instruction {
    display: none;
}

/* Breathing Circle */
.breathing-circle {
    width: 300px;
    height: 300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1s ease 0.4s both;
}

.breathing-circle-inner {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.3), rgba(26, 188, 156, 0.3));
    box-shadow: 0 0 60px rgba(52, 152, 219, 0.6), inset 0 0 40px rgba(26, 188, 156, 0.4);
    animation: breathe 6s ease-in-out infinite;
    transition: all 0.5s ease;
}

@keyframes breathe {
    0%,
    100% {
        transform: scale(0.9);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Glass Controls */
.meditation-controls-glass {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    gap: 12px;
    opacity: 1;
    transition: opacity 0.6s ease;
    animation: slideInBottom 0.6s ease 0.5s both;
}

.meditation-controls-glass.fade-controls {
    opacity: 0.25;
}

.meditation-controls-glass:hover,
.meditation-controls-glass.interacting {
    opacity: 1;
}

.glass-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.glass-btn:active {
    transform: scale(1.05) translateY(0);
}

.glass-btn i {
    transition: transform 0.3s ease;
}

.glass-btn:hover i {
    transform: scale(1.1);
}

.meditation-close-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.4);
    color: rgba(231, 76, 60, 1);
}

.meditation-theme-btn:hover {
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.2), rgba(155, 89, 182, 0.2));
    border-color: rgba(155, 89, 182, 0.4);
}

.meditation-pause-btn:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.4);
    color: rgba(52, 152, 219, 1);
}

/* Theme Hint */
.meditation-theme-hint {
    display: none;
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .meditation-title {
        font-size: 2rem;
    }

    .meditation-subtitle {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }

    .meditation-instruction {
        font-size: 1rem;
        margin-top: 2rem;
    }

    .breathing-circle {
        width: 250px;
        height: 250px;
    }

    .breathing-circle-inner {
        width: 150px;
        height: 150px;
    }

    .meditation-controls-glass {
        bottom: 20px;
        gap: 10px;
    }

    .glass-btn {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .meditation-title {
        font-size: 1.8rem;
    }

    .meditation-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .meditation-instruction {
        font-size: 0.9rem;
        margin-top: 1.5rem;
    }

    .breathing-circle {
        width: 200px;
        height: 200px;
    }

    .breathing-circle-inner {
        width: 120px;
        height: 120px;
    }

    .meditation-controls-glass {
        bottom: 15px;
        gap: 8px;
    }

    .glass-btn {
        width: 44px;
        height: 44px;
        font-size: 0.95rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glass-btn {
        background: rgba(255, 255, 255, 0.15);
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .meditation-overlay,
    .meditation-title,
    .meditation-subtitle,
    .meditation-instruction,
    .breathing-circle,
    .meditation-controls-glass,
    .meditation-theme-hint,
    .glass-btn {
        animation: none;
        transition: none;
    }

    .breathing-circle-inner {
        animation: none;
    }
}
