/* Premium Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: fixed;
    width: 100%;
    height: 100%;
    -webkit-overflow-scrolling: touch;
    color: #1a202c;
}

/* Premium Header with Holographic Effects */
.premium-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-radius: 0 0 25px 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding-top: env(safe-area-inset-top);
    animation: headerGlow 3s ease-in-out infinite;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    height: 100%;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06d6a0 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stress-monitor {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stress-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stress-bar {
    width: 120px;
    height: 8px;
    background: rgba(148, 163, 184, 0.3);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.stress-gradient {
    height: 100%;
    background: linear-gradient(90deg, #06d6a0 0%, #34d399 50%, #10b981 100%);
    border-radius: 20px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
    overflow: hidden;
}

.stress-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

.stress-level-text {
    font-weight: 700;
    font-size: 14px;
    color: #374151;
    min-width: 40px;
}

.biometric-pulse {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

.settings-fab {
    width: 44px;
    height: 44px;
    border-radius: 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.settings-fab:active {
    transform: scale(0.95);
}

.settings-icon {
    position: relative;
    width: 20px;
    height: 20px;
}

.settings-icon::before,
.settings-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 1px;
    top: 50%;
    left: 0;
    transform-origin: center;
    transition: transform 0.3s ease;
}

.settings-icon::before {
    transform: translateY(-50%) rotate(0deg);
}

.settings-icon::after {
    transform: translateY(-50%) rotate(90deg);
}

/* Edge-to-edge Canvas */
.main-canvas {
    display: block;
    touch-action: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* Revolutionary Floating Action Button */
.floating-action-button {
    position: fixed;
    bottom: 120px;
    right: 25px;
    z-index: 998;
    margin-bottom: env(safe-area-inset-bottom);
}

.fab-main {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.fab-main:active {
    transform: scale(0.95);
}

.floating-action-button.radial-open .fab-main {
    transform: rotate(45deg);
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.fab-icon {
    font-size: 28px;
    transition: all 0.3s ease;
    z-index: 2;
}

.fab-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: all 0.6s ease;
}

.fab-main:active .fab-ripple {
    width: 100px;
    height: 100px;
}

/* Radial Menu */
.radial-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.radial-item {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
    pointer-events: none;
    border: 2px solid rgba(99, 102, 241, 0.2);
}

.radial-item.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

.radial-item:hover {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transform: translate(-50%, -50%) scale(1.1);
    border-color: transparent;
}

.radial-item:hover .toy-icon {
    filter: brightness(0) invert(1);
}

.radial-item .toy-icon {
    font-size: 22px;
    transition: all 0.3s ease;
}

.toy-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.radial-item:hover .toy-tooltip {
    opacity: 1;
}

/* Position radial items in a circle */
.floating-action-button.radial-open .radial-item[data-angle="0"] { transform: translate(-50%, -50%) translateY(-90px) scale(1); }
.floating-action-button.radial-open .radial-item[data-angle="30"] { transform: translate(-50%, -50%) translate(45px, -78px) scale(1); }
.floating-action-button.radial-open .radial-item[data-angle="60"] { transform: translate(-50%, -50%) translate(78px, -45px) scale(1); }
.floating-action-button.radial-open .radial-item[data-angle="90"] { transform: translate(-50%, -50%) translateX(90px) scale(1); }
.floating-action-button.radial-open .radial-item[data-angle="120"] { transform: translate(-50%, -50%) translate(78px, 45px) scale(1); }
.floating-action-button.radial-open .radial-item[data-angle="180"] { transform: translate(-50%, -50%) translateY(90px) scale(1); }
.floating-action-button.radial-open .radial-item[data-angle="240"] { transform: translate(-50%, -50%) translate(-78px, 45px) scale(1); }
.floating-action-button.radial-open .radial-item[data-angle="300"] { transform: translate(-50%, -50%) translate(-78px, -45px) scale(1); }

/* Quick Access Favorites Bar */
.favorites-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(60px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px 25px 0 0;
    padding: 20px 25px 10px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 997;
}

.favorites-bar.expanded {
    transform: translateX(-50%) translateY(0);
}

.favorites-handle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorites-handle:hover {
    background: #94a3b8;
}

.handle-indicator {
    width: 100%;
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #06d6a0);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

.favorites-content {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 5px;
}

.favorite-toy {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.favorite-toy:hover {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.favorite-toy:active {
    transform: scale(0.95);
}

/* Advanced Control Center */
.control-center {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.15);
    z-index: 999;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: env(safe-area-inset-bottom);
}

.control-center.expanded {
    transform: translateY(-50px);
}

.control-handle {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.handle-line {
    width: 100%;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.control-handle:hover .handle-line {
    background: #94a3b8;
    height: 6px;
}

.control-content {
    padding: 25px 25px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quick-controls {
    display: flex;
    gap: 15px;
}

.control-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

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

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

.control-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #06d6a0 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-icon {
    font-size: 18px;
    filter: brightness(0) invert(1);
}

.session-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #374151;
    font-variant-numeric: tabular-nums;
}

/* AI Wellness Panel */
.wellness-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transform: translateX(350px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.wellness-panel.open {
    transform: translateX(0);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.ai-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    animation: aiPulse 2s ease-in-out infinite;
}

.ai-title h3 {
    font-size: 16px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 4px;
}

.ai-status {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.wellness-content {
    padding: 20px;
}

.insight-card {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 12px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    border-left: 3px solid #6366f1;
}

.insight-icon {
    font-size: 20px;
    color: #6366f1;
}

.insight-text {
    flex: 1;
}

.insight-text p {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    margin: 0;
}

.breathing-guide {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 20px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.breathing-guide:hover {
    background: rgba(16, 185, 129, 0.1);
}

.breathing-circle {
    width: 60px;
    height: 60px;
    border: 3px solid #10b981;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.breathing-inner {
    width: 80%;
    height: 80%;
    background: linear-gradient(135deg, #10b981 0%, #06d6a0 100%);
    border-radius: 50%;
    transition: transform 4s ease-in-out;
    transform: scale(1);
}

.breathing-instruction {
    font-size: 14px;
    font-weight: 600;
    color: #064e3b;
    margin: 0;
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 25px 25px 0 0;
    padding: 30px 25px;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.2);
    max-height: 80vh;
    overflow-y: auto;
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
}

.settings-panel.open {
    transform: translateY(0);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.panel-header h3 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.1);
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.close-btn:active {
    transform: scale(0.95);
    background: rgba(148, 163, 184, 0.2);
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-section h4 {
    font-size: 18px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

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

.setting-item label {
    font-weight: 600;
    color: #374151;
    font-size: 16px;
    flex: 1;
}

.premium-toggle {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #6366f1;
}

.premium-slider {
    width: 140px;
    height: 8px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.3);
    outline: none;
    cursor: pointer;
    appearance: none;
}

.premium-slider::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.premium-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Focus Timer Modal */
.timer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.timer-modal.visible {
    opacity: 1;
    visibility: visible;
}

.timer-content {
    background: white;
    padding: 40px 30px;
    border-radius: 25px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 350px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.timer-modal.visible .timer-content {
    transform: scale(1);
}

.timer-content h3 {
    font-size: 24px;
    font-weight: 800;
    color: #374151;
    margin-bottom: 30px;
}

.timer-display {
    margin-bottom: 30px;
}

.timer-time {
    font-size: 48px;
    font-weight: 900;
    color: #6366f1;
    font-variant-numeric: tabular-nums;
    display: block;
    margin-bottom: 15px;
}

.timer-progress {
    width: 100%;
    height: 6px;
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.timer-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

.timer-btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: 14px;
}

.timer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

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

.timer-presets {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.preset-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.preset-btn:active {
    background: #6366f1;
    color: white;
}

/* Achievement Toast */
.achievement-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #10b981 0%, #06d6a0 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
    z-index: 10002;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 320px;
    min-width: 250px;
}

.achievement-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.achievement-icon {
    font-size: 24px;
    animation: bounce 0.6s ease-in-out;
}

.achievement-text {
    flex: 1;
}

.achievement-title {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.achievement-desc {
    display: block;
    font-size: 13px;
    opacity: 0.9;
    font-weight: 500;
}

/* Voice Control Indicator */
.voice-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(99, 102, 241, 0.95);
    color: white;
    padding: 20px 30px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10003;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.voice-indicator.active {
    opacity: 1;
    visibility: visible;
}

.voice-waves {
    display: flex;
    gap: 3px;
    align-items: center;
}

.wave {
    width: 3px;
    height: 20px;
    background: white;
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.wave:nth-child(2) {
    animation-delay: 0.2s;
}

.wave:nth-child(3) {
    animation-delay: 0.4s;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    color: white;
}

.premium-logo {
    margin-bottom: 40px;
}

.logo-icon {
    font-size: 64px;
    margin-bottom: 15px;
    animation: spin 3s linear infinite;
}

.premium-logo h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.premium-logo p {
    font-size: 16px;
    opacity: 0.8;
    font-weight: 600;
}

.loading-progress {
    width: 280px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffffff 0%, #06d6a0 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.loading-text {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 500;
}

/* Focus Mode */
body.focus-mode .premium-header,
body.focus-mode .control-center,
body.focus-mode .floating-action-button,
body.focus-mode .favorites-bar {
    opacity: 0.1;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

body.focus-mode .premium-header:hover,
body.focus-mode .control-center:hover,
body.focus-mode .floating-action-button:hover,
body.focus-mode .favorites-bar:hover {
    opacity: 0.8;
    pointer-events: all;
}

/* Animations */
@keyframes headerGlow {
    0%, 100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); }
    50% { box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

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

/* Responsive Design */
@media (max-width: 480px) {
    .premium-header {
        height: 65px;
        padding: 0 20px;
    }

    .logo {
        font-size: 24px;
    }

    .stress-bar {
        width: 100px;
        height: 6px;
    }

    .stress-level-text {
        font-size: 12px;
        min-width: 35px;
    }

    .fab-main {
        width: 56px;
        height: 56px;
    }

    .fab-icon {
        font-size: 24px;
    }

    .radial-item {
        width: 44px;
        height: 44px;
    }

    .radial-item .toy-icon {
        font-size: 18px;
    }

    .control-btn {
        width: 44px;
        height: 44px;
    }

    .btn-icon {
        font-size: 16px;
    }

    .timer-time {
        font-size: 36px;
    }

    .wellness-panel {
        width: 280px;
        right: 15px;
    }

    .achievement-toast {
        max-width: 280px;
        min-width: 220px;
        padding: 15px 20px;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .premium-header {
        height: 55px;
    }

    .logo {
        font-size: 20px;
    }

    .floating-action-button {
        bottom: 80px;
        right: 20px;
    }

    .fab-main {
        width: 52px;
        height: 52px;
    }

    .fab-icon {
        font-size: 22px;
    }

    .control-center {
        padding: 15px 20px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .premium-header,
    .floating-action-button .fab-main,
    .favorites-bar,
    .control-center {
        background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.9) 100%);
        color: #e2e8f0;
        border-color: rgba(71, 85, 105, 0.3);
    }

    .logo {
        background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #34d399 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .settings-panel,
    .timer-content,
    .wellness-panel {
        background: #1e293b;
        color: #e2e8f0;
        border-color: rgba(71, 85, 105, 0.3);
    }

    .panel-header h3 {
        background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .stat-label {
        color: #94a3b8;
    }

    .stat-value {
        color: #e2e8f0;
    }

    .close-btn {
        background: rgba(71, 85, 105, 0.2);
        color: #94a3b8;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .premium-header,
    .floating-action-button .fab-main,
    .favorites-bar,
    .control-center {
        border: 2px solid #000;
        box-shadow: none;
    }

    .control-btn,
    .settings-fab {
        border: 2px solid #000;
    }

    .radial-item {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .loading-screen .logo-icon {
        animation: none;
    }

    .breathing-inner {
        transition: none;
    }
}

/* Safe Area Adjustments for Notch Devices */
@supports (padding: max(0px)) {
    .premium-header {
        padding-top: max(env(safe-area-inset-top), 10px);
        height: calc(70px + env(safe-area-inset-top));
    }

    .control-center {
        padding-bottom: max(env(safe-area-inset-bottom), 20px);
    }

    .floating-action-button {
        margin-bottom: max(env(safe-area-inset-bottom), 0px);
        margin-right: max(env(safe-area-inset-right), 0px);
    }

    .settings-panel {
        padding-bottom: calc(30px + max(env(safe-area-inset-bottom), 0px));
    }
}

/* Premium Visual Effects */
.floating-action-button .fab-main::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #06d6a0, #6366f1);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
}

.floating-action-button.radial-open .fab-main::after {
    opacity: 1;
}

/* Custom Scrollbar */
.settings-panel::-webkit-scrollbar {
    width: 6px;
}

.settings-panel::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 3px;
}

.settings-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 3px;
}

.settings-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}