.dashboard-container {
    max-width: 800px;
    margin: 120px auto 40px;
    padding: 20px;
    position: relative;
    z-index: 2;
    transition: all 0.5s ease;
}

/* Desktop Layout (≥768px) */
@media (min-width: 768px) {
    .dashboard-container {
        max-width: 1800px !important;
        min-height: calc(100vh - 100px);
        height: auto !important;
        display: grid !important;
        grid-template-columns: 1.6fr 1.2fr 0.9fr !important;
        grid-template-rows: auto auto auto 1fr !important;
        grid-template-areas: 
            "status stats timeline"
            "sleep battery timeline"
            "hr insights timeline"
            "weight . timeline" !important;
        gap: 24px !important;
        padding: 10px 30px !important;
        overflow: visible !important;
    }

    /* Ensure all cards take full height of their grid area */
    #status-card, .stats-grid, .timeline-section, #hr-card, #battery-card, #sleep-card, #weight-card, .insights-section {
        height: 100% !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Specific area assignments */
    #status-card { 
        grid-area: status; 
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .stats-grid {
        grid-area: stats;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
        align-content: center;
    }
    .timeline-section {
        grid-area: timeline;
        display: flex !important;
        flex-direction: column !important;
        max-height: 100% !important;
    }
    #hr-card { grid-area: hr; display: flex; flex-direction: column; height: 280px !important; min-height: 280px !important; max-height: 280px !important; }
    #battery-card { grid-area: battery; height: 320px; min-height: 320px; max-height: 320px; }
    #sleep-card { grid-area: sleep; height: 320px; min-height: 320px; max-height: 320px; }
    #weight-card { grid-area: weight; height: 280px !important; min-height: 280px !important; max-height: 280px !important; }
    .insights-section {
        grid-area: insights;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    /* Scrollable content areas */
    #activity-list, #top-apps-list {
        flex: 1;
        overflow-y: auto !important;
        padding-right: 5px;
    }

    /* Adjust font sizes for desktop density */
    .app-info-large h1 { font-size: 2.5rem !important; }
    .stat-value { font-size: 1.4rem !important; }
}

#hr-chart {
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

#hr-summary {
    position: static;
    margin-top: 10px !important;
}

.card-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.35;
}

.status-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.status-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.status-left {
    flex: 1;
    min-width: 200px;
    overflow: hidden; /* Prevent text overflow */
}

.status-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    min-width: 140px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4d4d;
    box-shadow: 0 0 8px #ff4d4d;
}

.status-text {
    font-size: 0.7rem;
}

.app-info-large h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin: 10px 0 6px;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-package {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.battery-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.battery-icon-large {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.12);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
}

.device-icon-container {
    width: 90px;
    height: 90px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-preview-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.status-device-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    padding: 12px 0 6px;
}

.device-status-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.device-status-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.device-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.device-status-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.device-status-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.device-status-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.device-status-battery {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.device-status-state {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.usage-toggle {
    margin-left: 8px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.usage-toggle:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.activity-device-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.65);
    margin-left: 6px;
}

.activity-device-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.preview-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
}

.preview-content {
    flex: 1;
    min-width: 0;
}

.preview-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: #fff;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
}

.insights-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
    align-items: start;
}

.insight-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 20px;
    align-self: start;
}

.battery-card {
    grid-column: 1 / -1;
}

.insight-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
}

.top-app-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 10px;
}

.top-app-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.top-app-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}

.top-app-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.hourly-chart {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2px;
    height: 120px;
    padding: 6px 6px 8px;
    width: 100%;
}

.hourly-bar-container {
    flex: 1 1 0;
    height: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    cursor: pointer;
    position: relative;
}

.hourly-bar {
    width: 100%;
    background: rgba(0, 255, 136, 0.6);
    border-radius: 10px 10px 6px 6px;
    min-height: 6px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.hourly-bar.empty {
    background: rgba(255, 255, 255, 0.1);
}

.hourly-bar-container:hover .hourly-bar {
    transform: translateY(-4px);
    background: rgba(0, 255, 136, 0.85);
}

.hourly-label {
    margin-top: 0;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.music-wave-island {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.island-bar {
    width: 4px;
    height: 12px;
    background: #00ff88;
    border-radius: 4px;
    animation: wave 1s ease-in-out infinite;
}

.island-bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.island-bar:nth-child(2) { height: 14px; animation-delay: 0.1s; }
.island-bar:nth-child(3) { height: 10px; animation-delay: 0.2s; }

.status-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

.status-card:hover::before {
    left: 100%;
}

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

.status-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 10px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4d4d;
    box-shadow: 0 0 8px #ff4d4d;
    transition: all 0.3s ease;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.status-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, background 0.3s ease;
}

.status-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.status-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.status-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 500;
}

.status-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
}

/* App Icons */
.app-icon-large {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.app-icon-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-icon-large svg {
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.8);
}

/* Timeline */
.timeline-section {
    margin-top: 40px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    animation: slideDown 0.3s ease-out;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
}

.app-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    margin-right: 15px;
    flex-shrink: 0;
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2px;
}

.activity-title-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 6px;
    vertical-align: -3px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.06);
    align-items: center;
    justify-content: center;
}

.activity-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.activity-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: right;
}

.activity-duration {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    color: #00ff88;
    text-align: right;
}

/* Animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

/* Charts */
.chart-container {
    height: 180px;
    width: 100%;
    margin-top: 15px;
    margin-bottom: 25px;
    position: relative;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100%;
    padding-top: 20px;
    gap: 4px;
}

.bar-wrapper {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    cursor: pointer;
}

.bar {
    width: 100%;
    background: rgba(0, 255, 136, 0.2);
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease, background 0.3s;
    min-height: 2px;
    position: relative;
}

.bar-wrapper:hover .bar {
    background: rgba(0, 255, 136, 0.5);
}

.bar-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 5px;
    z-index: 10;
}

.bar-wrapper:hover .bar-tooltip {
    opacity: 1;
}

/* Music Player */
.dynamic-island {
    display: none; /* Hidden by default */
    position: fixed;
    top: 86px;
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, calc(100% - 40px));
    height: 50px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 6px 14px;
    align-items: center;
    gap: 15px;
    animation: slideUp 0.5s ease-out;
    z-index: 20;
    backdrop-filter: blur(10px);
}

.dynamic-island.playing {
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 12px rgba(0, 255, 136, 0.12);
}

.album-art {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.music-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-info {
    flex: 1;
    overflow: hidden;
}

.music-title {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-artist {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    margin-top: 0;
}

.music-waves {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
}

.wave-bar {
    width: 3px;
    height: 100%;
    background: #00ff88;
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0.0s; height: 60%; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; height: 80%; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; height: 40%; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; height: 100%; }

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

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        margin-top: 80px;
        padding: 15px;
    }

    .status-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .status-card {
        padding: 20px;
    }

    .status-top-row {
        flex-direction: row;
        align-items: flex-start;
        flex-wrap: nowrap;
        gap: 12px;
    }

    .status-left {
        flex: 1 1 auto;
        min-width: 0;
    }

    .status-right {
        width: auto;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-start;
        gap: 10px;
        margin-top: 0;
    }

    .battery-display {
        width: 100%;
        justify-content: flex-end;
        gap: 6px;
    }

    .battery-icon-large {
        width: 28px;
        height: 28px;
    }

    .device-icon-container {
        width: 78px;
        height: 78px;
    }

    .app-info-large h1 {
        font-size: 1.8rem;
    }

    .status-preview-section {
        flex-direction: row;
        align-items: center;
    }

    .preview-text {
        white-space: normal;
    }

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

    .stat-item {
        padding: 12px;
    }
} 

/* Visitor Stats in Navbar */
.visitor-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 15px;
}

.status-card.locked {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.lock-icon-pulse {
    animation: lockPulse 3s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes lockPulse {
    0% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
    100% { transform: scale(1); opacity: 0.3; }
}

.activity-item.locked {
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid rgba(255, 255, 255, 0.1) !important;
}

.activity-item.locked .activity-duration {
    color: rgba(255, 255, 255, 0.3);
}

.status-card.locked .status-icon {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

/* Moments Overlay */
.moments-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.moments-overlay.active {
    display: flex;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.4);
    color: #00ff88;
}

.glass-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.glass-input:focus {
    border-color: #00ff88;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}

select.glass-input option {
    background: #121218;
    color: white;
}

.publish-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.glass-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Space Grotesk', sans-serif;
}

.glass-btn.primary {
    background: #00ff88;
    color: #000;
}

.glass-btn.primary:hover {
    background: #00cc6e;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.glass-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.moments-overlay.active {
    display: flex;
    opacity: 1;
}

.moments-container {
    width: 100%;
    max-width: 760px;
    max-height: 86vh;
    overflow-y: auto;
    background: rgba(18, 18, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.moments-overlay.active .moments-container {
    transform: translateY(0);
}

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

.moment-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    animation: slideUp 0.4s ease-out;
}

.moment-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.moment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.moment-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.moment-name {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.moment-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.moment-content {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
}

.moment-actions {
    display: flex;
    gap: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.moment-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.moments-container::-webkit-scrollbar {
    width: 6px;
}

.moments-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.moments-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

/* Sleep Overlay */
.sleep-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.sleep-container {
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.sleep-list {
    max-height: 60vh;
    overflow-y: auto;
    margin-top: 20px;
}

.sleep-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.close-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 10px 30px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Floating Message Styles */
.message-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 255, 136, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 136, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00ff88;
    cursor: pointer;
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.2);
    animation: float 6s ease-in-out infinite;
}

.message-fab:hover {
    transform: scale(1.1);
    background: rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
}

.message-fab.active {
    background: rgba(255, 77, 77, 0.2);
    border-color: rgba(255, 77, 77, 0.4);
    color: #ff4d4d;
    transform: rotate(135deg);
    box-shadow: 0 4px 20px rgba(255, 77, 77, 0.2);
}

.message-fab.active:hover {
    background: rgba(255, 77, 77, 0.3);
    box-shadow: 0 0 30px rgba(255, 77, 77, 0.4);
    transform: rotate(135deg) scale(1.1);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Message Modal Styles */
.message-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2100;
    display: none;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.message-content {
    background: rgba(18, 18, 24, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 500px;
    height: 85vh;
    border-radius: 32px 32px 0 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 768px) {
    .message-modal {
        align-items: center;
    }
    .message-content {
        height: 700px;
        border-radius: 32px;
        transform: translateY(30px) scale(0.95);
    }
}

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

/* AI Chat Specific */
.ai-chat-content {
    border: 1px solid rgba(0, 255, 136, 0.15);
    background: linear-gradient(180deg, rgba(18, 18, 24, 0.95) 0%, rgba(10, 10, 15, 0.98) 100%);
}

.ai-avatar-container {
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    position: relative;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-avatar-container::after {
    content: '';
    position: absolute;
    bottom: 20px;
    width: 120px;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.2) 0%, transparent 70%);
    filter: blur(5px);
    border-radius: 50%;
    transform: scaleX(1.5);
    z-index: -1;
}

.message-modal.active .ai-avatar-container {
    opacity: 1;
    transform: scale(1);
}

#assistant-sprite {
    position: fixed;
    bottom: 30px;
    right: 110px;
    width: 60px;
    height: 60px;
    left: auto;
    top: auto;
    border-radius: 50%;
    background: rgba(0, 255, 136, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 136, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00ff88;
    cursor: pointer;
    z-index: 2500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.15);
    animation: float 7s ease-in-out infinite reverse;
}

#assistant-sprite:hover {
    transform: scale(1.1);
    background: rgba(0, 255, 136, 0.25);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
}

#assistant-sprite svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 5px rgba(0, 255, 136, 0.5));
}

#assistant-sprite.in-chat {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
}

/* AI Bubbles */
.ai-message-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: none;
}

.ai-message-list::-webkit-scrollbar {
    display: none;
}

.ai-bubble {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    animation: bubbleFadeUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.ai-bubble.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #6e45e2 0%, #88d3ce 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(110, 69, 226, 0.3);
}

.ai-bubble.assistant {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 4px;
    backdrop-filter: blur(10px);
}

.ai-chat-form {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#ai-chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 10px 15px;
    outline: none;
    font-size: 0.95rem;
}

#ai-chat-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.ai-chat-form button {
    background: linear-gradient(135deg, #00ff88 0%, #00bdff 100%);
    border: none;
    color: #000;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
}

.ai-chat-form button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.3);
}

#assistant-sprite.notifying {
    filter: drop-shadow(0 0 15px #00ff88);
    animation: notifying-glow 1.5s ease-in-out infinite;
}

@keyframes notifying-glow {
    0%, 100% { filter: drop-shadow(0 0 5px #00ff88); transform: scale(1); }
    50% { filter: drop-shadow(0 0 20px #00ff88); transform: scale(1.05); }
}

.ai-toast {
    position: fixed;
    bottom: 110px;
    left: 24px;
    background: rgba(18, 18, 24, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 16px;
    padding: 12px 16px;
    color: #fff;
    z-index: 3000;
    max-width: 300px;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.ai-toast.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ai-toast-tag {
    display: inline-block;
    font-size: 0.7rem;
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 6px;
    font-family: 'Orbitron', sans-serif;
}

.ai-toast p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

#assistant-sprite canvas {
    width: 100%;
    height: 100%;
    display: block;
}

@media (max-width: 768px) {
    #assistant-sprite {
        width: 50px;
        height: 50px;
        right: 80px;
        bottom: 20px;
        left: auto;
    }
    
    .message-fab {
        width: 50px;
        height: 50px;
        right: 20px;
        bottom: 20px;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay[style*="display: none"] {
    display: none !important;
}

.ai-settings-content {
    background: rgba(18, 18, 24, 0.95);
    border: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.1);
}

.settings-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
}

.model-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.model-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.model-check {
    width: 18px;
    height: 18px;
    accent-color: #00ff88;
    cursor: pointer;
}

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

.model-id {
    font-size: 0.9rem;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
}

.model-provider {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.model-priority {
    width: 60px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    text-align: center;
    font-size: 0.85rem;
}

.model-priority:focus {
    border-color: #00ff88;
    outline: none;
}

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

@media (min-width: 768px) {
    .message-modal.active .message-content {
        transform: scale(1);
    }
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.message-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-header h3 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.close-msg-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.close-msg-btn:hover {
    background: rgba(255, 77, 77, 0.2);
    border-color: rgba(255, 77, 77, 0.4);
    color: #ff4d4d;
    transform: rotate(90deg);
}

.message-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-right: 5px;
}

.ai-chat-content {
    height: 85vh;
    max-height: 760px;
}

.ai-message-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.ai-bubble.user {
    align-self: flex-end;
    background: rgba(112, 0, 255, 0.35);
    border: 1px solid rgba(112, 0, 255, 0.5);
}

.ai-bubble.assistant {
    align-self: flex-start;
    background: rgba(0, 242, 255, 0.12);
    border: 1px solid rgba(0, 242, 255, 0.3);
}

.ai-chat-form {
    display: flex;
    gap: 10px;
}

.ai-chat-form input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.ai-chat-form button {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #00f2ff, #7000ff);
    color: #fff;
    cursor: pointer;
}

@media (max-width: 768px) {
    .ai-chat-content {
        height: 88vh;
        max-height: none;
    }
    .ai-avatar-container {
        height: 140px;
    }
}

/* Scrollbar */
.message-list::-webkit-scrollbar {
    width: 4px;
}
.message-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.message-bubble {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    animation: fadeIn 0.3s ease;
}

.message-bubble.system-bubble {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.05);
    transition: transform 0.2s, background 0.2s;
}

.message-bubble.system-bubble:hover {
    background: rgba(0, 255, 136, 0.15);
    transform: translateX(4px);
}

.msg-action-hint {
    margin-top: 8px;
    font-size: 0.75rem;
    color: rgba(0, 255, 136, 0.8);
    display: flex;
    align-items: center;
    gap: 4px;
}

.msg-action-hint::after {
    content: '→';
    font-weight: bold;
}

.msg-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 6px;
}

.msg-author {
    color: #00ff88;
    font-weight: 500;
}

.msg-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
}

.message-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-form input,
.message-form textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.message-form input:focus,
.message-form textarea:focus {
    border-color: #00ff88;
}

.message-form textarea {
    height: 80px;
    resize: none;
}

.message-form button {
    background: #00ff88;
    color: #000;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.message-form button:hover {
    background: #00cc6a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.loading-msg {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    padding: 20px;
    font-style: italic;
}
