* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Ultra glass morphism colors */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.05);

    /* Accent colors with liquid glass feel */
    --accent-primary: #a78bfa;
    --accent-secondary: #60a5fa;
    --accent-glow: rgba(167, 139, 250, 0.3);

    /* Text colors */
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-tertiary: rgba(255, 255, 255, 0.4);

    /* Background gradient */
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* Light mode adjustments */
body.light-mode {
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: rgba(0, 0, 0, 0.03);

    --text-primary: rgba(0, 0, 0, 0.9);
    --text-secondary: rgba(0, 0, 0, 0.6);
    --text-tertiary: rgba(0, 0, 0, 0.4);

    --accent-glow: rgba(102, 126, 234, 0.25);

    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

body.light-mode .video-container video {
    filter: brightness(1.3) saturate(1.2);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a0f;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: safe center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 120px 0;
    position: relative;
}

/* Video Background with enhanced filtering */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-gradient);
    opacity: 0.35;
    z-index: 1;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.video-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 2;
    pointer-events: none;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) saturate(1.3) blur(3px);
}

/* Burger Menu - ultra smooth */
.burger-menu {
    position: fixed;
    top: calc(24px + env(safe-area-inset-top));
    left: 24px;
    width: 52px;
    height: 52px;
    border: none;
    background: var(--glass-bg);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.burger-menu:hover {
    transform: scale(1.05) translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 48px rgba(167, 139, 250, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.burger-menu span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent-glow);
}

.burger-menu.active {
    background: rgba(167, 139, 250, 0.15);
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Menu Overlay with liquid glass effect */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
}

.menu-overlay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.menu-overlay.active::before {
    opacity: 1;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.menu-link {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -2px;
    text-shadow: 0 0 20px var(--accent-glow),
                 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    position: relative;
}

.menu-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 12px var(--accent-glow);
}

.menu-overlay.active .menu-link {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.menu-overlay.active .menu-link:nth-child(1) {
    transition-delay: 0.1s;
}

.menu-overlay.active .menu-link:nth-child(2) {
    transition-delay: 0.15s;
}

.menu-link:hover {
    color: var(--accent-primary);
    transform: translateY(-8px) scale(1.08);
    text-shadow: 0 0 30px var(--accent-glow),
                 0 0 60px var(--accent-glow),
                 0 8px 16px rgba(0, 0, 0, 0.4);
}

.menu-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.menu-divider {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 4px;
    padding: 6px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.menu-overlay.active .menu-divider {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.menu-app-link {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    text-shadow: 0 0 16px var(--accent-glow);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateY(20px);
    padding: 10px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid transparent;
}

.menu-app-link img {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    border-radius: 50%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.menu-app-link:hover {
    color: var(--accent-primary);
    transform: translateY(-6px) scale(1.05);
    text-shadow: 0 0 24px var(--accent-glow),
                 0 0 48px var(--accent-glow);
    background: rgba(167, 139, 250, 0.08);
    border-color: rgba(167, 139, 250, 0.2);
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.15);
}

.menu-app-link:hover img {
    transform: rotate(360deg) scale(1.1);
}

.menu-overlay.active .menu-app-link {
    opacity: 1;
    transform: translateY(0);
}

.menu-overlay.active .menu-app-link:nth-child(4) { transition-delay: 0.25s; }
.menu-overlay.active .menu-app-link:nth-child(5) { transition-delay: 0.3s; }
.menu-overlay.active .menu-app-link:nth-child(6) { transition-delay: 0.35s; }
.menu-overlay.active .menu-app-link:nth-child(7) { transition-delay: 0.4s; }
.menu-overlay.active .menu-app-link:nth-child(8) { transition-delay: 0.45s; }
.menu-overlay.active .menu-app-link:nth-child(9) { transition-delay: 0.5s; }
.menu-overlay.active .menu-app-link:nth-child(10) { transition-delay: 0.55s; }
.menu-overlay.active .menu-app-link:nth-child(11) { transition-delay: 0.6s; }

body.menu-open {
    overflow: hidden;
}

/* App Viewer */
.app-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: #000;
    display: none;
    flex-direction: column;
}

.app-viewer.active {
    display: flex;
}

.app-viewer-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    padding-top: calc(14px + env(safe-area-inset-top));
    background: var(--glass-bg);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    color: var(--text-primary);
    border: none;
    border-bottom: 1px solid var(--glass-border);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.app-viewer-back svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.app-viewer-back:hover {
    color: var(--accent-primary);
    background: rgba(167, 139, 250, 0.08);
}

.app-viewer-back:hover svg {
    transform: translateX(-4px);
}

.app-viewer iframe {
    flex: 1;
    width: 100%;
    border: none;
}

/* Theme Toggle with liquid glass */
.theme-toggle {
    position: fixed;
    top: calc(24px + env(safe-area-inset-top));
    right: 24px;
    width: 52px;
    height: 52px;
    border: none;
    background: var(--glass-bg);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 48px rgba(167, 139, 250, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transition: all 0.4s ease;
}

.theme-toggle .sun-icon {
    display: none;
}

body.light-mode .theme-toggle .moon-icon {
    display: none;
}

body.light-mode .theme-toggle .sun-icon {
    display: block;
}

/* Container */
.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 90%;
    max-width: 520px;
    z-index: 1;
    animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Card Base with ultra smooth glass */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 36px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent);
    opacity: 0.5;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2),
                0 0 40px rgba(167, 139, 250, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border-color: rgba(167, 139, 250, 0.2);
}

/* Profile Card */
.profile-card {
    text-align: center;
    animation-delay: 0.1s;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    text-align: left;
}

.profile-info {
    flex: 1;
}

.profile-info .tagline {
    margin-bottom: 16px;
}

.avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg,
        rgba(167, 139, 250, 0.2),
        rgba(96, 165, 250, 0.2));
    flex-shrink: 0;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(167, 139, 250, 0.2),
                inset 0 0 20px rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.15),
        transparent 60%);
    pointer-events: none;
}

.avatar:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 16px 48px rgba(167, 139, 250, 0.3);
}

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

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -3px;
    text-shadow: 0 0 20px var(--accent-glow),
                 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

h1::after {
    content: '|';
    color: var(--accent-primary);
    animation: blink 1s step-end infinite, glow 2s ease-in-out infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 10px var(--accent-glow);
    }
    50% {
        text-shadow: 0 0 20px var(--accent-glow),
                     0 0 30px var(--accent-glow);
    }
}

.tagline {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 28px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Bio with glass effect */
.bio {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 24px;
    text-align: left;
    min-height: 3.2em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    white-space: pre-wrap;
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.bio::after {
    content: '|';
    color: var(--accent-primary);
    animation: blink 1s step-end infinite;
    margin-left: 1px;
}

.bio.done::after {
    display: none;
}

/* Social Icons - blended and subtle */
.social-icons {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 0;
    margin-bottom: 8px;
}

.social-icons a {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--accent-glow);
    transition: all 0.5s ease;
    opacity: 0;
}

.social-icons a:hover::before {
    width: 120%;
    height: 120%;
    opacity: 0.5;
}

.social-icons a:hover {
    color: var(--text-primary);
    transform: translateY(-6px) scale(1.08);
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.15);
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.social-icons a svg {
    width: 22px;
    height: 22px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.social-icons a:hover svg {
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* Location - blended and subtle */
.location {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.location:hover {
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.location svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 6px var(--accent-glow));
    opacity: 0.8;
}

/* Music Card with enhanced glass */
.music-card {
    animation-delay: 0.2s;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.music-card.playing {
    border-color: rgba(167, 139, 250, 0.3);
    box-shadow: 0 24px 80px rgba(167, 139, 250, 0.2),
                0 0 60px rgba(167, 139, 250, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.music-top {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
}

.album-art {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg,
        rgba(167, 139, 250, 0.2),
        rgba(96, 165, 250, 0.2));
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.2);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.album-art::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.15),
        transparent 60%);
}

.music-card.playing .album-art {
    animation: rotate 20s linear infinite;
}

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

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-art.no-art {
    display: flex;
    align-items: center;
    justify-content: center;
}

.album-art.no-art::before {
    content: '🎵';
    font-size: 2rem;
}

.track-info {
    flex: 1;
    min-width: 0;
}

.track-name {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 600;
    min-width: 35px;
    text-align: center;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress {
    height: 100%;
    background: linear-gradient(90deg,
        var(--accent-primary),
        var(--accent-secondary));
    border-radius: 10px;
    transition: width 0.1s linear;
    position: relative;
    box-shadow: 0 0 16px var(--accent-glow);
}

.progress::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-glow),
                0 2px 8px rgba(0, 0, 0, 0.3);
}

.music-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.control-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.control-btn:hover {
    transform: scale(1.12);
    background: rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.3);
    box-shadow: 0 6px 20px rgba(167, 139, 250, 0.25);
}

.control-btn svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.play-pause {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg,
        var(--accent-primary),
        var(--accent-secondary));
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.3);
}

.play-pause:hover {
    box-shadow: 0 12px 32px rgba(167, 139, 250, 0.5);
}

.play-pause svg {
    width: 24px;
    height: 24px;
}

.play-pause .pause-icon {
    display: none;
}

.music-card.playing .play-pause .play-icon {
    display: none;
}

.music-card.playing .play-pause .pause-icon {
    display: block;
}

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

.volume-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.volume-slider {
    width: 80px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg,
        var(--accent-primary),
        var(--accent-secondary));
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px var(--accent-glow),
                0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 0 16px var(--accent-glow);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg,
        var(--accent-primary),
        var(--accent-secondary));
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px var(--accent-glow),
                0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 0 16px var(--accent-glow);
}

/* Message Card */
.message-card {
    animation-delay: 0.3s;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.message-header svg {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.message-header span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

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

.message-input {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 14px 18px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message-input::placeholder {
    color: var(--text-tertiary);
}

.message-input:focus {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(167, 139, 250, 0.3);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1),
                inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.message-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg,
        var(--accent-primary),
        var(--accent-secondary));
    border: none;
    border-radius: 20px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.3);
    position: relative;
    overflow: hidden;
}

.message-send-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.5s ease;
}

.message-send-btn:hover::before {
    width: 300px;
    height: 300px;
}

.message-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(167, 139, 250, 0.5);
}

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

.message-send-btn svg {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
}

.message-send-btn span {
    position: relative;
    z-index: 1;
}

.message-success {
    padding: 14px 20px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 20px;
    color: #4ade80;
    text-align: center;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.15);
}

.message-success.show {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive Design - Enhanced */
@media (max-width: 768px) {
    body {
        padding: 90px 0 60px;
    }

    .burger-menu,
    .theme-toggle {
        top: calc(16px + env(safe-area-inset-top));
        width: 50px;
        height: 50px;
    }

    .burger-menu {
        left: 16px;
    }

    .theme-toggle {
        right: 16px;
    }

    .container {
        gap: 18px;
        width: 92%;
        max-width: 100%;
    }

    .card {
        padding: 30px 24px;
        border-radius: 28px;
    }

    .menu-nav {
        padding: 28px 20px;
        border-radius: 32px;
        max-width: 90%;
        max-height: 80vh;
    }

    .menu-link {
        font-size: 2rem;
    }

    .menu-app-link {
        font-size: 1.1rem;
        padding: 8px 16px;
    }

    .menu-app-link img {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        max-width: 32px;
        max-height: 32px;
    }

    h1 {
        font-size: 1.9rem;
        letter-spacing: -2px;
    }

    .profile-header {
        gap: 16px;
    }

    .avatar {
        width: 90px;
        height: 90px;
    }

    .tagline {
        font-size: 0.92rem;
    }

    .bio {
        font-size: 0.9rem;
        padding: 16px;
    }

    .social-icons {
        gap: 8px;
    }

    .social-icons a {
        width: 50px;
        height: 50px;
    }

    .social-icons a svg {
        width: 20px;
        height: 20px;
    }

    .location {
        font-size: 0.85rem;
        padding: 9px 16px;
    }

    .music-top {
        gap: 16px;
    }

    .album-art {
        width: 70px;
        height: 70px;
    }

    .track-name {
        font-size: 0.9rem;
    }

    .progress-container {
        gap: 8px;
    }

    .time {
        font-size: 0.7rem;
        min-width: 32px;
    }

    .music-bottom {
        gap: 12px;
    }

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

    .play-pause {
        width: 50px;
        height: 50px;
    }

    .volume-control {
        display: none;
    }

    .message-header {
        margin-bottom: 20px;
        padding-bottom: 14px;
    }

    .message-header svg {
        width: 22px;
        height: 22px;
    }

    .message-header span {
        font-size: 1.05rem;
    }

    .message-input {
        padding: 13px 16px;
        font-size: 0.92rem;
    }

    .message-send-btn {
        padding: 13px 24px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 80px 0 50px;
    }

    .burger-menu,
    .theme-toggle {
        width: 48px;
        height: 48px;
        top: calc(12px + env(safe-area-inset-top));
    }

    .burger-menu {
        left: 12px;
    }

    .theme-toggle {
        right: 12px;
    }

    .container {
        width: 94%;
        gap: 16px;
    }

    .card {
        padding: 26px 20px;
        border-radius: 26px;
    }

    .menu-nav {
        padding: 24px 16px;
        border-radius: 28px;
        max-width: 92%;
    }

    .menu-link {
        font-size: 1.7rem;
    }

    .menu-app-link {
        font-size: 1rem;
        gap: 10px;
        padding: 7px 14px;
    }

    .menu-app-link img {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        max-width: 28px;
        max-height: 28px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .profile-info {
        text-align: center;
    }

    .avatar {
        width: 85px;
        height: 85px;
    }

    .tagline {
        font-size: 0.88rem;
        margin-bottom: 20px;
    }

    .bio {
        font-size: 0.88rem;
        padding: 14px;
        margin-bottom: 20px;
    }

    .social-icons {
        gap: 7px;
        margin-bottom: 20px;
    }

    .social-icons a {
        width: 48px;
        height: 48px;
    }

    .social-icons a svg {
        width: 19px;
        height: 19px;
    }

    .location {
        font-size: 0.82rem;
        padding: 8px 14px;
    }

    .location svg {
        width: 15px;
        height: 15px;
    }

    .music-top {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    .track-info {
        width: 100%;
    }

    .album-art {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        max-width: 180px;
        margin: 0 auto;
    }

    .track-name {
        font-size: 0.88rem;
        margin-bottom: 10px;
    }

    .music-bottom {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .controls {
        gap: 7px;
    }

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

    .control-btn svg {
        width: 18px;
        height: 18px;
    }

    .play-pause {
        width: 48px;
        height: 48px;
    }

    .play-pause svg {
        width: 22px;
        height: 22px;
    }

    .message-header {
        margin-bottom: 18px;
    }

    .message-header span {
        font-size: 1rem;
    }

    .message-input {
        padding: 12px 15px;
        font-size: 0.9rem;
        border-radius: 18px;
    }

    .message-textarea {
        min-height: 90px;
    }

    .message-send-btn {
        padding: 12px 22px;
        font-size: 0.92rem;
        border-radius: 18px;
    }

    .message-send-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .container {
        width: 96%;
    }

    .card {
        padding: 22px 18px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .menu-link {
        font-size: 1.5rem;
    }

    .social-icons a {
        width: 46px;
        height: 46px;
    }
}

/* ================================================
   ADMIN PAGE STYLES
   ================================================ */

.admin-card {
    max-width: 450px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
    flex-wrap: wrap;
}

.admin-header:has(.logout-btn) {
    justify-content: space-between;
}

.lock-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.admin-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -2px;
}

.admin-title::after {
    display: none;
}

.admin-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.passcode-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.passcode-input {
    width: 100%;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.passcode-input::placeholder {
    color: var(--text-tertiary);
}

.passcode-input:focus {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(167, 139, 250, 0.3);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

.passcode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.3);
}

.passcode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(167, 139, 250, 0.5);
}

.passcode-btn svg {
    width: 20px;
    height: 20px;
}

.error-message {
    color: #ef4444;
    text-align: center;
    font-size: 0.9rem;
    min-height: 20px;
    margin-top: 8px;
}

.admin-content {
    max-width: 650px;
    margin: 0 auto;
    width: 90%;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.15);
}

.logout-btn svg {
    width: 18px;
    height: 18px;
}

.admin-welcome {
    text-align: center;
    margin-bottom: 32px;
    padding: 20px;
    background: rgba(167, 139, 250, 0.08);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.admin-welcome p {
    margin-bottom: 4px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.admin-welcome p:last-child {
    margin-bottom: 0;
}

.admin-user {
    color: var(--accent-primary);
    font-weight: 600;
}

.admin-description {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.6;
}

}

.admin-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.admin-section-title.collapsible {
    width: 100%;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 12px 16px;
    margin-bottom: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.admin-section-title.collapsible:hover {
    background: rgba(255, 255, 255, 0.02);
}

.collapsible-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.collapsible-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.admin-section-title.collapsible.open .collapsible-arrow {
    transform: rotate(90deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    margin-top: 0;
}

.collapsible-content.open {
    max-height: 1000px;
    margin-top: 16px;
}

.admin-section-title h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.admin-section-title svg {
    color: var(--accent-primary);
}

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
}

.stat-info h3 {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -1px;
}

/* Clickable stat card */
.stat-card-clickable {
    cursor: pointer;
    position: relative;
}

.stat-card-clickable:hover {
    border-color: var(--accent-primary);
}

.stat-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.stat-card-clickable:hover .stat-arrow {
    transform: translateX(4px);
    color: var(--accent-primary);
}

/* Message Card (index page) */
.message-card {
    padding: 24px;
    animation-delay: 0.4s;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

.message-header svg {
    width: 22px;
    height: 22px;
    color: var(--accent-primary);
}

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

.message-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Space Grotesk', sans-serif;
    outline: none;
    transition: all 0.3s ease;
    resize: none;
}

.message-input::placeholder {
    color: var(--text-secondary);
}

.message-input:focus {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.message-textarea {
    min-height: 80px;
    max-height: 160px;
}

.message-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--accent-primary);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.message-send-btn:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.message-send-btn svg {
    width: 18px;
    height: 18px;
}

.message-success {
    text-align: center;
    color: #22c55e;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.message-success.show {
    opacity: 1;
    transform: translateY(0);
}

/* Inbox Modal */
.inbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2000;
    padding: 20px;
}

.inbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.inbox-modal {
    width: 100%;
    max-width: 550px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.inbox-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -2px;
}

.inbox-title::after {
    display: none;
}

.inbox-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.inbox-close:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.1);
}

.inbox-close svg {
    width: 20px;
    height: 20px;
}

.inbox-messages {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.inbox-messages::-webkit-scrollbar {
    width: 6px;
}

.inbox-messages::-webkit-scrollbar-track {
    background: transparent;
}

.inbox-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

.inbox-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 0;
    font-size: 0.95rem;
}

.inbox-message {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.inbox-message.unread {
    border-left: 3px solid var(--accent-primary);
    background: rgba(139, 92, 246, 0.08);
}

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

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

.inbox-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.inbox-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inbox-delete-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.inbox-delete-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
}

.inbox-delete-btn svg {
    width: 16px;
    height: 16px;
}

.inbox-body {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

/* App Tabs */
.app-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.app-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.app-tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.app-tab:hover {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}

.app-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* App Sections */
.app-section {
    display: none;
}

.app-section.active {
    display: block;
    overflow: hidden;
}

/* App Placeholder */
.app-placeholder {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-secondary);
}

.app-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
    opacity: 0.5;
    margin-bottom: 16px;
}

.app-placeholder h2 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.app-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

/* Traffic Graph Modal */
.traffic-modal {
    max-width: 600px;
}

.traffic-toggles {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.traffic-btn {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

.traffic-chart-container {
    width: 100%;
    flex-shrink: 0;
}

.traffic-chart-container canvas {
    width: 100%;
    display: block;
}

.traffic-summary {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 16px;
    flex-shrink: 0;
}

/* Tesla Dashboard */
.tesla-setup {
    text-align: center;
    padding: 40px 20px;
}

.tesla-setup svg {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
    opacity: 0.5;
    margin-bottom: 16px;
}

.tesla-setup h2 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tesla-setup p {
    margin: 0 0 24px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tesla-setup-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.tesla-setup-form input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Space Grotesk', sans-serif;
    outline: none;
    transition: all 0.3s ease;
}

.tesla-setup-form input::placeholder {
    color: var(--text-secondary);
}

.tesla-setup-form input:focus {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.tesla-connect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: var(--accent-primary);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tesla-connect-btn:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.tesla-connect-btn svg {
    width: 18px;
    height: 18px;
}

/* Tesla Refresh Bar */
.tesla-refresh-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.tesla-refresh-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tesla-refresh-left .tesla-car-state {
    font-weight: 600;
    color: var(--text-primary);
}

.tesla-refresh-left .tesla-car-state.online {
    color: #22c55e;
}

.tesla-refresh-left .tesla-car-state.asleep {
    color: var(--text-secondary);
}

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

.tesla-icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tesla-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
}

.tesla-icon-btn svg {
    width: 16px;
    height: 16px;
}

.tesla-icon-btn.spinning svg {
    animation: spin 1s linear infinite;
}

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

/* Tesla Status Card */
.tesla-status {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    margin-bottom: 16px;
}

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

.tesla-car-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -1px;
}

.tesla-car-name::after {
    display: none;
}

.tesla-disconnect-btn {
    padding: 6px 12px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tesla-disconnect-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Battery */
.tesla-battery {
    margin-bottom: 16px;
}

.tesla-battery-info {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}

.tesla-battery-level {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.tesla-battery-level::after {
    display: none;
}

.tesla-battery-range {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tesla-battery-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.tesla-battery-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease, background 0.5s ease;
}

.tesla-battery-bar-fill.high {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.tesla-battery-bar-fill.medium {
    background: linear-gradient(90deg, #eab308, #facc15);
}

.tesla-battery-bar-fill.low {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.tesla-battery-bar-limit {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 2px;
    background: var(--text-primary);
    opacity: 0.6;
}

/* Status Grid */
.tesla-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tesla-status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    min-width: 0;
    border-radius: 10px;
}

.tesla-status-item svg {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.tesla-status-item-info {
    min-width: 0;
}

.tesla-status-item-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tesla-status-item-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tesla Controls */
.tesla-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.tesla-control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tesla-control-btn:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.tesla-control-btn svg {
    width: 24px;
    height: 24px;
}

.tesla-control-btn.active {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
    color: var(--accent-primary);
}

.tesla-control-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.tesla-control-btn.loading svg {
    animation: spin 1s linear infinite;
}

.tesla-control-btn.action-flash {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
}

/* Tesla Sliders / Input Groups */
.tesla-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    margin-bottom: 10px;
    min-width: 0;
}

.tesla-input-group svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.tesla-input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.tesla-input-group input[type="number"] {
    width: 60px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Minecart LCD', monospace;
    text-align: center;
    outline: none;
    margin-left: auto;
    -moz-appearance: textfield;
}

.tesla-input-group input[type="number"]::-webkit-inner-spin-button,
.tesla-input-group input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tesla-input-group input[type="number"]:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

.tesla-set-btn {
    padding: 8px 16px;
    background: var(--accent-primary);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tesla-set-btn:hover {
    background: #7c3aed;
}

/* Tesla Toast */
.tesla-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Space Grotesk', sans-serif;
    z-index: 3000;
    transition: transform 0.3s ease;
    white-space: nowrap;
}

.tesla-toast.show {
    transform: translateX(-50%) translateY(0);
}

.tesla-toast.success {
    border-color: rgba(34, 197, 94, 0.4);
}

.tesla-toast.error {
    border-color: rgba(239, 68, 68, 0.4);
}

/* Tesla Section Title */
.tesla-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    margin-top: 8px;
}

/* Clickable Tesla Status Items */
.tesla-status-item-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tesla-status-item-clickable:hover {
    background: rgba(255, 255, 255, 0.03);
}

.tesla-status-item-clickable:active {
    transform: scale(0.97);
}

.tesla-status-item-clickable .stat-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0.5;
}

/* Charging Modal */
.charging-modal {
    max-width: 420px;
    max-height: 85vh;
}

.charging-content {
    overflow-y: auto;
    padding: 0 4px 4px;
    -webkit-overflow-scrolling: touch;
}

/* Battery Hero */
.charging-hero {
    text-align: center;
    padding: 8px 0 20px;
}

.charging-battery-big {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.charging-battery-pct {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Minecart LCD', monospace;
    color: var(--text-primary);
    letter-spacing: -2px;
}

.charging-battery-range {
    font-size: 1rem;
    color: var(--text-secondary);
}

.charging-bar-track {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    overflow: visible;
    position: relative;
    margin-bottom: 12px;
}

.charging-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease, background 0.5s ease;
}

.charging-bar-fill.high {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.charging-bar-fill.medium {
    background: linear-gradient(90deg, #eab308, #facc15);
}

.charging-bar-fill.low {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.charging-bar-fill.charging-active {
    animation: chargingPulse 2s ease-in-out infinite;
}

@keyframes chargingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.charging-bar-limit {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 2px;
    background: var(--text-primary);
    opacity: 0.6;
    border-radius: 1px;
}

.charging-state-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.charging-state-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
}

.charging-state-badge.state-charging {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.charging-state-badge.state-complete {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.charging-state-badge.state-stopped {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
}

.charging-state-badge.state-disconnected {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.charging-time-left {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Charging Session Stats */
.charging-session {
    margin-bottom: 16px;
}

.charging-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.charging-stat {
    text-align: center;
    padding: 12px 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.charging-stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Minecart LCD', monospace;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.charging-stat-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Charging Detail Rows */
.charging-detail-rows,
.charging-info-section {
    margin-bottom: 16px;
}

.charging-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.charging-detail-row:last-child {
    border-bottom: none;
}

.charging-detail-row span:first-child {
    color: var(--text-secondary);
}

.charging-detail-row span:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

/* Charge Limit Slider */
.charging-limit-section {
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 16px;
}

.charging-limit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.charging-limit-value {
    font-family: 'Minecart LCD', monospace;
    font-size: 1rem;
    color: var(--accent-primary);
}

.charging-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
    outline: none;
    margin-bottom: 8px;
}

.charging-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: 3px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
    transition: transform 0.15s ease;
}

.charging-slider::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

.charging-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: 3px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.charging-limit-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Charging Actions */
.charging-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

.charging-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.charging-action-btn svg {
    width: 18px;
    height: 18px;
}

.charging-action-btn:hover {
    background: rgba(255, 255, 255, 0.02);
}

.charging-action-btn:active {
    transform: scale(0.97);
}

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

.charging-action-btn.charging-action-primary:hover {
    background: #7c3aed;
}

.charging-action-btn.charging-action-primary.active {
    background: #ef4444;
    border-color: #ef4444;
}

.charging-action-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Climate Modal */
.climate-modal {
    max-width: 420px;
    max-height: 85vh;
}

.climate-content {
    overflow-y: auto;
    padding: 0 4px 4px;
    -webkit-overflow-scrolling: touch;
}

/* Temp cards */
.climate-temps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.climate-temp-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.climate-temp-card svg {
    width: 14px;
    height: 14px;
    color: var(--accent-primary);
    opacity: 0.7;
}

.climate-temp-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.climate-temp-value {
    font-size: 1.15rem;
    font-weight: 700;
    font-family: 'Minecart LCD', monospace;
    color: var(--text-primary);
    letter-spacing: -1px;
}

/* Climate power button */
.climate-power-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 14px;
}

.climate-power-btn svg {
    width: 16px;
    height: 16px;
}

.climate-power-btn:hover {
    background: rgba(255, 255, 255, 0.02);
}

.climate-power-btn:active {
    transform: scale(0.98);
}

.climate-power-btn.active {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.climate-power-btn.active:hover {
    background: rgba(34, 197, 94, 0.2);
}

.climate-power-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Temperature control */
.climate-temp-control {
    margin-bottom: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.climate-temp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.climate-set-temp {
    font-family: 'Minecart LCD', monospace;
    font-size: 1.1rem;
    color: var(--accent-primary);
}

.climate-temp-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.climate-temp-min,
.climate-temp-max {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
    flex-shrink: 0;
}

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

.climate-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
    transition: transform 0.15s ease;
}

.climate-slider::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

.climate-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

/* Heated Seats */
.climate-seats-section {
    margin-bottom: 14px;
}

.climate-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.climate-seats-layout {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.climate-seats-row {
    display: flex;
    gap: 6px;
}

.climate-seat-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.climate-seat-btn svg {
    width: 18px;
    height: 18px;
    transition: color 0.2s ease;
}

.climate-seat-btn.climate-seat-sm svg {
    width: 16px;
    height: 16px;
}

.climate-seat-btn.climate-seat-sm {
    padding: 8px 4px;
}

.climate-seat-level {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.climate-seat-name {
    font-size: 0.55rem;
    opacity: 0.6;
}

.climate-seat-btn:hover {
    background: rgba(255, 255, 255, 0.03);
}

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

.climate-seat-btn.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Seat heat levels */
.climate-seat-btn.seat-heat-1 {
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.2);
    color: #facc15;
}

.climate-seat-btn.seat-heat-1 svg {
    color: #facc15;
}

.climate-seat-btn.seat-heat-2 {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.25);
    color: #fb923c;
}

.climate-seat-btn.seat-heat-2 svg {
    color: #fb923c;
}

.climate-seat-btn.seat-heat-3 {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.climate-seat-btn.seat-heat-3 svg {
    color: #f87171;
}

/* Defrost button */
.climate-defrost-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.climate-defrost-btn svg {
    width: 16px;
    height: 16px;
}

.climate-defrost-btn:hover {
    background: rgba(255, 255, 255, 0.02);
}

.climate-defrost-btn:active {
    transform: scale(0.98);
}

.climate-defrost-btn.active {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.3);
    color: #60a5fa;
}

.climate-defrost-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ============ Finance Dashboard ============ */

/* Period Selector */
.fin-period-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.fin-period-btn {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fin-period-btn:hover {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}

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

/* Summary Cards */
.fin-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.fin-summary-card {
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.fin-summary-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.fin-summary-value {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -1px;
}

.fin-income .fin-summary-value { color: #22c55e; }
.fin-expense .fin-summary-value { color: #ef4444; }
.fin-net .fin-summary-value { color: var(--text-primary); }
.fin-net.positive .fin-summary-value { color: #22c55e; }
.fin-net.negative .fin-summary-value { color: #ef4444; }

/* Chart Section */
.fin-chart-section {
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

.fin-donut-wrap {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
}

.fin-donut-wrap canvas {
    width: 200px !important;
    height: 200px !important;
}

.fin-donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.fin-donut-total {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -1px;
}

.fin-donut-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Legend */
.fin-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: center;
}

.fin-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

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

/* Bar Chart */
.fin-bar-container {
    padding: 16px 0;
}

.fin-bar-container canvas {
    width: 100% !important;
    max-height: 220px;
}

/* Transactions */
.fin-transactions-header {
    margin-top: 20px;
    margin-bottom: 12px;
}

.fin-transactions-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.fin-transactions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fin-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 32px 0;
    font-size: 0.9rem;
}

.fin-tx-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.fin-tx-item:active {
    background: rgba(255, 255, 255, 0.02);
}

.fin-tx-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fin-tx-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

.fin-tx-info {
    flex: 1;
    min-width: 0;
}

.fin-tx-note {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fin-tx-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.fin-tx-amount {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.fin-tx-amount.income { color: #22c55e; }
.fin-tx-amount.expense { color: #ef4444; }

/* FAB */
.fin-fab {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom));
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
    transition: all 0.3s ease;
    z-index: 100;
}

.fin-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(139, 92, 246, 0.6);
}

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

.fin-fab svg {
    width: 28px;
    height: 28px;
}

/* Add Transaction Modal */
.fin-modal {
    max-width: 420px;
    max-height: 90vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.fin-type-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
}

.fin-type-btn {
    flex: 1;
    padding: 14px 10px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fin-type-btn.fin-type-expense.active {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.fin-type-btn.fin-type-income.active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.fin-amount-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 20px;
}

.fin-amount-dollar {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-secondary);
    font-family: 'Minecart LCD', monospace;
}

.fin-amount-input {
    width: 160px;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -1px;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--glass-border);
    color: var(--text-primary);
    text-align: center;
    outline: none;
    padding: 4px 0;
    transition: border-color 0.3s ease;
    -moz-appearance: textfield;
}

.fin-amount-input::-webkit-outer-spin-button,
.fin-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fin-amount-input:focus {
    border-bottom-color: var(--accent-primary);
}

.fin-amount-input::placeholder {
    color: rgba(255, 255, 255, 0.08);
}

/* Category Grid */
.fin-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.fin-cat-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-family: 'Space Grotesk', sans-serif;
}

.fin-cat-btn:hover {
    background: rgba(255, 255, 255, 0.02);
}

.fin-cat-btn.active {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.15);
    color: var(--text-primary);
}

.fin-cat-btn svg {
    width: 22px;
    height: 22px;
}

.fin-cat-btn span {
    font-size: 0.65rem;
    font-weight: 500;
}

.fin-note-input,
.fin-date-input {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Space Grotesk', sans-serif;
    outline: none;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fin-date-input {
    display: block;
    min-height: 44px;
    -webkit-text-fill-color: var(--text-primary);
}

.fin-note-input::placeholder {
    color: var(--text-secondary);
}

.fin-note-input:focus,
.fin-date-input:focus {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.fin-date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.5;
    cursor: pointer;
}

/* Account selectors in transaction modal */
.fin-account-selectors {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.fin-account-select-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fin-account-select-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.fin-account-select-row .fin-bill-select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
}

.fin-add-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent-primary);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fin-add-btn:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.fin-add-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Delete button on transaction */
.fin-tx-delete {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0;
}

.fin-tx-item:hover .fin-tx-delete {
    opacity: 1;
}

.fin-tx-delete:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
}

.fin-tx-delete svg {
    width: 14px;
    height: 14px;
}

/* ============ Finance Sub-tabs ============ */
.fin-subtabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.fin-subtabs::-webkit-scrollbar {
    display: none;
}

.fin-subtab {
    padding: 6px 14px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.fin-subtab:hover {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}

.fin-subtab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.fin-panel {
    display: none;
}

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

/* ============ Accounts Panel ============ */
.fin-accounts-summary {
    margin-bottom: 16px;
}

.fin-accounts-networth {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    text-align: center;
}

.fin-accounts-networth-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.fin-accounts-networth-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.fin-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fin-account-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.fin-account-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fin-account-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

.fin-account-info {
    flex: 1;
    min-width: 0;
}

.fin-account-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.fin-account-type {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.fin-account-balance {
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

/* ============ Goals Panel ============ */
.fin-goals-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fin-goal-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
}

.fin-goal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

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

.fin-goal-amounts {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.fin-goal-amounts span {
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -0.5px;
}

.fin-goal-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.fin-goal-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

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

.fin-goal-action-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fin-goal-action-btn:hover {
    background: rgba(255, 255, 255, 0.02);
}

.fin-goal-action-btn.contribute {
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.fin-goal-action-btn.contribute:hover {
    background: rgba(34, 197, 94, 0.1);
}

.fin-goal-action-btn.withdraw {
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.fin-goal-action-btn.withdraw:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ============ Bills Panel ============ */
.fin-bills-section {
    margin-bottom: 20px;
}

.fin-bills-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
}

.fin-bills-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fin-bill-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.fin-bill-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: transparent;
    padding: 0;
}

.fin-bill-check.paid {
    background: #22c55e;
    border-color: #22c55e;
}

.fin-bill-check.paid svg {
    display: block;
}

.fin-bill-check svg {
    width: 14px;
    height: 14px;
    color: white;
    display: none;
}

.fin-bill-info {
    flex: 1;
    min-width: 0;
}

.fin-bill-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.fin-bill-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.fin-bill-amount {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.fin-bill-item.is-paid .fin-bill-name,
.fin-bill-item.is-paid .fin-bill-amount {
    opacity: 0.5;
    text-decoration: line-through;
}

/* Bill modal form elements */
.fin-bill-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.fin-bill-label {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.fin-bill-day-input {
    width: 64px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Minecart LCD', monospace;
    text-align: center;
    outline: none;
    -moz-appearance: textfield;
}

.fin-bill-day-input::-webkit-inner-spin-button,
.fin-bill-day-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fin-bill-day-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

.fin-bill-select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: 'Space Grotesk', sans-serif;
    outline: none;
    cursor: pointer;
}

.fin-bill-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

.fin-bill-select option {
    background: #1e1e28;
    color: var(--text-primary);
}

.fin-bill-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
}

.fin-bill-check-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

/* ============ Debts Panel ============ */
.fin-debts-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.fin-debts-summary-card {
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    text-align: center;
}

.fin-debts-summary-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.fin-debts-summary-value {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -1px;
}

.fin-debts-remaining { color: #ef4444; }
.fin-debts-paid { color: #22c55e; }

.fin-debts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fin-debt-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
}

.fin-debt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

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

.fin-debt-balance {
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Minecart LCD', monospace;
    letter-spacing: -0.5px;
    color: #ef4444;
}

.fin-debt-details {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.fin-debt-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.fin-debt-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    transition: width 0.4s ease;
}

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

.fin-debt-pay-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-primary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fin-debt-pay-btn:hover {
    background: rgba(139, 92, 246, 0.2);
}

/* ============ Color Picker ============ */
.fin-color-picker {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 12px 0;
    flex-wrap: wrap;
}

.fin-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    padding: 0;
}

.fin-color-swatch:hover {
    transform: scale(1.15);
}

.fin-color-swatch.active {
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

/* ============ Amount Prompt Modal ============ */
.fin-amount-prompt-modal {
    max-width: 360px;
}

/* ============ Delete button for cards ============ */
.fin-card-delete {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.fin-card-delete:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
}

.fin-card-delete svg {
    width: 14px;
    height: 14px;
}

/* Responsive Tesla */
@media (max-width: 480px) {
    .tesla-controls {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .tesla-control-btn {
        padding: 12px 8px;
        font-size: 0.7rem;
        gap: 6px;
    }

    .tesla-control-btn svg {
        width: 20px;
        height: 20px;
    }

    .tesla-status-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    /* Charging Modal responsive */
    .charging-modal {
        max-height: 90vh;
    }

    .charging-stats-grid {
        gap: 8px;
    }

    .charging-stat-value {
        font-size: 1.2rem;
    }

    .charging-actions {
        gap: 8px;
    }

    /* Climate Modal responsive */
    .climate-modal {
        max-height: 90vh;
    }

    .climate-temp-value {
        font-size: 1rem;
    }

    .climate-temp-card {
        padding: 8px 6px;
    }

    .climate-seat-btn {
        padding: 8px 4px;
    }

    .climate-seat-btn svg {
        width: 16px;
        height: 16px;
    }

    .climate-seat-btn.climate-seat-sm svg {
        width: 14px;
        height: 14px;
    }

    .tesla-status-item {
        padding: 8px;
        gap: 8px;
    }

    .tesla-status-item svg {
        width: 16px;
        height: 16px;
    }

    .tesla-status-item-value {
        font-size: 0.8rem;
    }

    .tesla-status-item-label {
        font-size: 0.65rem;
    }

    .tesla-battery-level {
        font-size: 1.6rem;
    }

    .tesla-input-group {
        padding: 10px 12px;
        gap: 8px;
    }

    .tesla-input-group label {
        font-size: 0.8rem;
    }

    .tesla-input-group input[type="number"] {
        width: 52px;
        padding: 6px 8px;
        font-size: 0.85rem;
    }

    .tesla-set-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .tesla-refresh-bar {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        padding: 8px 12px;
    }

    .tesla-refresh-actions {
        justify-content: flex-end;
    }

    .tesla-status {
        padding: 14px;
    }

    .tesla-car-name {
        font-size: 0.95rem;
    }

    .tesla-disconnect-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    .tesla-setup {
        padding: 24px 12px;
    }

    /* Finance responsive */
    .fin-summary {
        gap: 6px;
    }

    .fin-summary-card {
        padding: 10px 8px;
    }

    .fin-summary-value {
        font-size: 1rem;
    }

    .fin-summary-label {
        font-size: 0.65rem;
    }

    .fin-donut-wrap {
        width: 180px;
        height: 180px;
    }

    .fin-donut-wrap canvas {
        width: 180px !important;
        height: 180px !important;
    }

    .fin-donut-total {
        font-size: 1.1rem;
    }

    .fin-category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .fin-amount-input {
        font-size: 1.6rem;
    }

    .fin-amount-dollar {
        font-size: 1.6rem;
    }

    .fin-tx-delete {
        opacity: 1;
    }

    .fin-fab {
        bottom: calc(16px + env(safe-area-inset-bottom));
        right: 16px;
    }

    .fin-subtabs {
        gap: 4px;
    }

    .fin-subtab {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .fin-accounts-networth-value {
        font-size: 1.5rem;
    }

    .fin-goal-actions {
        gap: 6px;
    }

    .fin-goal-action-btn {
        font-size: 0.75rem;
        padding: 7px;
    }

    .fin-debts-summary {
        gap: 6px;
    }

    .fin-debts-summary-value {
        font-size: 1rem;
    }

    .fin-bill-item,
    .fin-account-item {
        padding: 10px;
        gap: 10px;
    }

    .fin-card-delete {
        opacity: 1;
    }
}

/* Enhanced Glassmorphism for Admin Components */
.admin-content .card,
.inbox-modal,
.amount-prompt-overlay .card,
.transaction-modal-overlay .card {
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
}

.app-tabs,
.fin-subtabs,
.admin-section-title,
.stat-card,
.inbox-message,
.transaction-item,
.fin-account-item,
.fin-goal-card,
.fin-bill-item,
.fin-debt-card,
.tesla-button,
.tesla-range-control {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Update modal overlays for consistent blur */
.inbox-overlay,
.amount-prompt-overlay,
.transaction-modal-overlay {
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

/* Mobile Profile & Layout Fixes */
/* album art: big on 480px (music card stacks), row layout on 768px */
@media (max-width: 480px) {
    .music-top {
        flex-direction: column !important;
        align-items: center !important;
    }
    .album-art {
        width: 120px !important;
        height: 120px !important;
        max-width: 120px !important;
        min-width: 120px !important;
        aspect-ratio: 1 !important;
    }
}
@media (max-width: 360px) {
    .album-art {
        width: 100px !important;
        height: 100px !important;
        max-width: 100px !important;
        min-width: 100px !important;
    }
}
@media (max-width: 768px) {
    .music-top {
        flex-direction: row !important;
        gap: 14px !important;
    }
    .album-art {
        width: 60px !important;
        height: 60px !important;
        max-width: 60px !important;
        min-width: 60px !important;
        flex-shrink: 0 !important;
    }
}
@media (max-width: 480px) {
    .avatar {
        width: 65px !important;
        height: 65px !important;
    }
    .album-art {
        width: 55px !important;
        height: 55px !important;
        max-width: 55px !important;
        min-width: 55px !important;
    }
    h1 { font-size: 1.4rem !important; }
    .tagline { font-size: 0.82rem !important; }
    /* Compact social icons so terminal stays visible */
    .profile-card .social-icons a {
        width: 38px !important;
        height: 38px !important;
    }
    .profile-card .social-icons {
        gap: 6px !important;
        margin-bottom: 8px !important;
    }
    .profile-card .profile-info .tagline {
        margin-bottom: 10px !important;
    }
    .profile-card .location {
        font-size: 0.78rem !important;
        padding: 6px 12px !important;
    }
}
@media (max-width: 360px) {
    .avatar {
        width: 60px !important;
        height: 60px !important;
    }
    .album-art {
        width: 50px !important;
        height: 50px !important;
        max-width: 50px !important;
        min-width: 50px !important;
    }
}

/* Admin Page Overlap Fixes */
.admin-section-title {
    position: relative;
    z-index: 1;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.stat-card,
.stat-card-clickable {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.collapsible-content {
    position: relative;
    z-index: 1;
    margin-bottom: 24px;
}

/* Ensure proper spacing between sections */
.admin-content > * {
    margin-bottom: 24px;
}

.admin-content > *:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .stat-card,
    .stat-card-clickable {
        padding: 16px;
        gap: 12px;
    }
}

/* ── Terminal ──────────────────────────────────────────────────────────────── */

.terminal-wrapper {
    text-align: left;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    font-family: 'MinecartLCD', 'Courier New', 'Lucida Console', monospace;
    font-size: 12.5px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.terminal-titlebar {
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.terminal-dot-red    { background: #ff5f57; }
.terminal-dot-yellow { background: #ffbd2e; }
.terminal-dot-green  { background: #28ca41; }

.terminal-title {
    margin-left: 6px;
    color: var(--text-tertiary);
    font-size: 11px;
    font-family: 'MinecartLCD', monospace;
    letter-spacing: 0.02em;
}

.terminal-output {
    flex: 1;
    padding: 10px 16px 6px;
    overflow-y: auto;
    max-height: 360px;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
    line-height: 1.45;
    font-size: 12.5px;
}

.terminal-output::-webkit-scrollbar { width: 4px; }
.terminal-output::-webkit-scrollbar-track { background: transparent; }
.terminal-output::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 2px; }

.term-cmd-line { color: var(--text-primary); }
.term-prompt-color { color: var(--accent-primary); }
.term-output-line { color: var(--text-secondary); }
.term-success { color: #4ade80; }
.term-error   { color: #f87171; }
.term-accent  { color: var(--accent-primary); }
.term-dim     { color: var(--text-tertiary); }
.term-matrix  { color: #4ade80; font-size: 11px; }
.term-art     { line-height: 1.2; font-size: 11px; letter-spacing: 0.04em; }

.terminal-input-row {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-top: 1px solid var(--glass-border);
    gap: 0;
    flex-shrink: 0;
}

.terminal-prompt {
    color: var(--accent-primary);
    white-space: nowrap;
    font-size: 12.5px;
    font-family: 'MinecartLCD', monospace;
    flex-shrink: 0;
}

.terminal-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    height: 20px;
}

.terminal-input {
    position: relative;
    z-index: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'MinecartLCD', 'Courier New', monospace;
    font-size: 12.5px;
    width: 100%;
    caret-color: var(--accent-primary);
    padding: 0;
    margin: 0;
    line-height: 1;
}

.terminal-ghost {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 0;
    font-family: 'MinecartLCD', 'Courier New', monospace;
    font-size: 12.5px;
    white-space: pre;
    line-height: 1;
    display: none;
}
.terminal-ghost .ghost-typed  { color: transparent; }
.terminal-ghost .ghost-hint   { color: var(--text-tertiary); }

.terminal-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 16px 12px;
    flex-shrink: 0;
}

.terminal-chip {
    background: rgba(167, 139, 250, 0.08);
    border: 1px solid rgba(167, 139, 250, 0.25);
    color: var(--accent-primary);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    font-family: 'MinecartLCD', monospace;
    white-space: nowrap;
    outline: none;
}
.terminal-chip:hover {
    background: rgba(167, 139, 250, 0.18);
    border-color: rgba(167, 139, 250, 0.5);
    transform: translateY(-1px);
}
.terminal-chip:active { transform: translateY(0); }

/* Light mode overrides */
body.light-mode .terminal-dot-red    { background: #e74c3c; }
body.light-mode .terminal-dot-yellow { background: #f39c12; }
body.light-mode .terminal-dot-green  { background: #27ae60; }
body.light-mode .terminal-chip {
    background: rgba(124, 58, 237, 0.07);
    border-color: rgba(124, 58, 237, 0.2);
}

@media (max-width: 768px) {
    /* Prevent iOS Safari from zooming on input focus (requires font-size >= 16px) */
    .terminal-input { font-size: 16px !important; }
    .terminal-wrapper { touch-action: manipulation; }
}
@media (max-width: 480px) {
    .terminal-wrapper { min-height: 300px; font-size: 12px; }
    .terminal-output  { max-height: 220px; font-size: 12px; }
    .terminal-prompt  { font-size: 12px; }
    .terminal-ghost   { font-size: 16px; }
}
