:root {
    --bg-body: #0f172a;
    --bg-gradient: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    --bg-gradient-size: 400% 400%;
    --glass-bg: #eee1e148;
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(255, 255, 255, 0.37);
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #000000;
    --primary: #09ffd6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --accent: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: #796de7ce;
    background-size: var(--bg-gradient-size);
    animation: gradientBG 15s ease infinite;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

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

body.theme-normal { 
    --bg-gradient: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab); 
    --primary: #3b82f6; 
    --primary-glow: rgba(59,130,246,0.5); 
}
body.theme-dark { 
    --bg-gradient: linear-gradient(-45deg, #1e293b, #0f172a, #334155, #1e293b); 
    --primary: #3b82f6; 
    --primary-glow: rgba(59,130,246,0.5); 
}
body.theme-light { 
    --bg-gradient: linear-gradient(-45deg, #e2e8f0, #f8fafc, #cbd5e1, #e2e8f0); 
    --text-primary: #0f172a; 
    --text-secondary: #334155; 
    --glass-bg: rgba(255,255,255,0.6); 
    --glass-border: rgba(15,23,42,0.1); 
    --primary: #2563eb; 
    --primary-glow: rgba(37,99,235,0.4); 
}
body.theme-glass { 
    --bg-gradient: linear-gradient(-45deg, #0f172a, #1e293b, #0f172a, #1e293b); 
    --primary: #00ccff; 
    --primary-glow: rgba(0,204,255,0.4); 
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
}

.glass-panel-inner {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
}

.app-wrapper { 
    display: flex; 
    min-height: 100vh; 
    max-width: 1600px; 
    margin: 0 auto; 
    padding: 20px; 
    gap: 20px; 
}

.sidebar { 
    width: 280px; 
    padding: 25px; 
    display: flex; 
    flex-direction: column; 
    flex-shrink: 0; 
    animation: slideInLeft 0.5s ease; 
}
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } }
.sidebar-header { 
    margin-bottom: 30px; 
}
.logo { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}
.logo-icon { 
    font-size: 2rem; 
    filter: drop-shadow(0 0 8px var(--primary-glow)); 
}
.logo h1 { 
    font-size: 1.5rem; 
    font-weight: 700; 
}

.sidebar-nav { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    margin-bottom: auto; 
}
.nav-item {
    display: flex; 
    align-items: center; 
    gap: 12px;
    padding: 14px 16px; 
    background: transparent; 
    border: none;
    border-radius: var(--radius-md); 
    color: var(--text-secondary);
    cursor: pointer; 
    font-size: 1rem; 
    font-weight: 500; 
    transition: var(--transition);
    position: relative; 
    overflow: hidden;
}
.nav-item::before { 
    content: ''; 
    position: absolute; 
    left: 0; 
    top: 0; 
    bottom: 0; 
    width: 4px; 
    background: var(--primary); 
    transform: scaleY(0); 
    transition: transform 0.3s; 
}
.nav-item:hover { 
    background: rgba(255,255,255,0.1); 
    color: white; 
}
.nav-item.active { 
    background: rgba(255,255,255,0.15); 
    color: white; font-weight: 600; 
}
.nav-item.active::before { 
    transform: scaleY(1); 
}

.sidebar-footer { 
    display: flex; 
    gap: 10px; 
    padding-top: 15px; 
    border-top: 1px solid rgba(255,255,255,0.08); 
}
.icon-btn { 
    width: 40px; 
    height: 40px; 
    background: rgba(255,255,255,0.08); 
    border: 1px solid var(--glass-border); 
    border-radius: 50%; 
    cursor: pointer; 
    font-size: 1.2rem; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: var(--transition); 
    color: var(--text-primary); 
    text-decoration: none; 
}
.icon-btn:hover { 
    background: rgba(255,255,255,0.15); 
    transform: scale(1.1); 
}

.main-content { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    animation: fadeIn 0.6s ease; 
}
.settings-section { 
    display: none; 
    flex-direction: column; 
    gap: 20px; 
}
.settings-section.active { 
    display: flex; 
}
.section-title { 
    font-size: 1.8rem; 
    font-weight: 800; 
    margin-bottom: 5px; 
}

.setting-card { 
    padding: 25px; 
}
.setting-card h3 { 
    font-size: 1.1rem; 
    font-weight: 700; 
    margin-bottom: 8px; 
}
.setting-desc { 
    font-size: 0.9rem; 
    color: var(--text-muted); 
    margin-bottom: 20px; 
}

.accent-picker { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    margin-bottom: 20px; 
}
.accent-options { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
}
.accent-dot { 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    cursor: pointer; 
    border: 3px solid transparent; 
    transition: var(--transition); 
}
.accent-dot:hover { 
    transform: scale(1.15); 
}
.accent-dot.active { 
    border-color: white; 
    box-shadow: 0 0 12px rgba(255,255,255,0.5); 
}
input[type="color"] { width: 50px; height: 36px; border: none; background: transparent; cursor: pointer; border-radius: var(--radius-sm); }

.preview-box { 
    padding: 15px; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}
.preview-box span { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
}
.preview-bar { 
    height: 8px; 
    border-radius: 10px; 
    background: var(--primary); 
    box-shadow: 0 0 15px var(--primary-glow); 
    transition: background 0.3s; 
}

.theme-grid { 
    display: flex; 
    gap: 10px; 
}
.theme-option { 
    padding: 12px 22px; 
    background: rgba(255,255,255,0.06); 
    border: 1px solid var(--glass-border); 
    border-radius: 30px; 
    color: var(--text-secondary); 
    cursor: pointer; 
    font-weight: 600; 
    transition: var(--transition); 
}
.theme-option:hover { 
    background: rgba(255,255,255,0.12); 
    color: white; 
}
.theme-option.active { 
    background: var(--primary); 
    color: #050508; 
    border-color: var(--primary); 
    box-shadow: 0 0 15px var(--primary-glow); 
}

.text-input { 
    width: 100%; 
    padding: 14px 18px; 
    background: rgba(255,255,255,0.05); 
    border: 1px solid var(--glass-border); 
    border-radius: var(--radius-md); 
    color: var(--text-primary); 
    font-size: 1rem; 
    margin-bottom: 15px; 
    transition: var(--transition); 
}
.text-input:focus { 
    outline: none; 
    border-color: var(--primary); 
    box-shadow: 0 0 15px var(--primary-glow); 
}

.primary-btn { 
    background: var(--primary); 
    color: #050508; 
    border: none; 
    padding: 12px 24px; 
    border-radius: 30px; 
    font-weight: 700; 
    cursor: pointer; 
    font-size: 0.95rem; 
    transition: var(--transition); 
}
.primary-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 0 20px var(--primary-glow); 
}

.danger-card { 
    border-color: rgba(239,68,68,0.3); 
}
.danger-btn { 
    background: var(--danger); 
    color: white; 
    border: none; 
    padding: 12px 24px; 
    border-radius: 30px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: var(--transition); 
    box-shadow: 0 0 10px rgba(239,68,68,0.4); 
}
.danger-btn:hover { 
    box-shadow: 0 0 20px rgba(239,68,68,0.6); 
    transform: scale(1.05); 
}

.storage-list { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    margin-bottom: 20px; 
}
.storage-item { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    padding: 14px 16px; 
    background: rgba(255,255,255,0.04); 
    border-radius: var(--radius-md); 
    border: 1px solid var(--glass-border); 
}
.storage-icon { 
    font-size: 1.4rem; 
}
.storage-info { 
    flex: 1; 
}
.storage-name { 
    font-weight: 600; 
    font-size: 0.95rem; 
}
.storage-key { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    font-family: monospace; 
}
.storage-size { 
    font-weight: 700; 
    color: var(--primary); 
    font-family: monospace; 
}
.storage-total { 
    display: flex; 
    justify-content: space-between; 
    padding: 15px; 
    background: rgba(255,255,255,0.06); 
    border-radius: var(--radius-md); 
}
.storage-total strong { 
    color: var(--primary); 
    font-family: monospace; 
}

.about-card { 
    text-align: center; 
}
.about-logo { 
    font-size: 4rem; 
    margin-bottom: 15px; 
    filter: drop-shadow(0 0 20px var(--primary-glow)); 
    animation: float 3s ease-in-out infinite; 
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.about-card h3 { 
    font-size: 1.5rem; margin-bottom: 10px; 
}
.about-desc { 
    color: var(--text-muted); 
    max-width: 500px; 
    margin: 0 auto 30px; 
    line-height: 1.6; 
}
.about-meta { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
    gap: 15px; 
}
.about-meta div { 
    padding: 15px; 
    background: rgba(255,255,255,0.04); 
    border-radius: var(--radius-md); 
}
.about-meta span { 
    display: block; 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin-bottom: 5px; 
}
.about-meta strong { 
    font-size: 1rem; 
}

.theme-menu { 
    position: fixed; 
    top: 70px; 
    right: 20px; 
    background: rgba(15,23,42,0.95); 
    backdrop-filter: blur(15px); 
    border: 1px solid var(--glass-border); 
    border-radius: var(--radius-lg); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
    z-index: 1000; 
    padding: 10px; 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
    opacity: 0; 
    visibility: hidden; 
    transform: translateY(-10px); 
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1); 
}
.theme-menu:not(.hidden) { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}
.theme-menu button { 
    width: 100%; 
    text-align: left; 
    padding: 12px 15px; 
    background: transparent; 
    border: none; color: var(--text-secondary); 
    cursor: pointer; 
    border-radius: var(--radius-sm); 
    transition: var(--transition); 
    font-size: 1rem; 
}
.theme-menu button:hover { 
    background: rgba(255,255,255,0.1); 
    color: white; 
    transform: translateX(5px); 
}

.toast-container { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    z-index: 2000; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}
.toast { 
    padding: 16px 24px; 
    background: rgba(15,23,42,0.95); 
    backdrop-filter: blur(10px); 
    color: white; 
    border-radius: var(--radius-md); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
    border-left: 4px solid var(--primary); 
    animation: slideInRight 0.4s cubic-bezier(0.175,0.885,0.32,1.275); 
    max-width: 350px; 
    font-weight: 500; 
}
.toast.success { 
    border-left-color: var(--success); 
}
.toast.error { 
    border-left-color: var(--danger); 
}
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.hidden { 
    display: none !important; 
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

::-webkit-scrollbar { 
    width: 8px; 
    height: 8px; 
}
::-webkit-scrollbar-track { 
    background: rgba(255,255,255,0.05); 
}
::-webkit-scrollbar-thumb { 
    background: rgba(255,255,255,0.2); 
    border-radius: 4px; 
}
::-webkit-scrollbar-thumb:hover { 
    background: rgba(255,255,255,0.3); 
}

@media (max-width: 1024px) {
    .app-wrapper { flex-direction: column; }
    .sidebar { width: 100%; }
    .sidebar-nav { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 768px) {
    .accent-picker { flex-direction: column; align-items: flex-start; }
    .theme-grid { flex-direction: column; }
    .about-meta { grid-template-columns: 1fr; }
}

.app-wrapper { max-width: none; padding: 12px; gap: 12px; }
.sidebar { width: 240px; padding: 18px; }
.main-content { padding: 18px; }
.sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-bottom: 12px; padding: 0; border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; background: rgba(255,255,255,0.1); color: white; cursor: pointer; font-size: 1.1rem; }
.sidebar-toggle:hover { background: rgba(255,255,255,0.2); }
.sidebar-collapsed .sidebar { display: none; }
.sidebar-collapsed .main-content { width: 100%; }
@media (max-width: 1024px) {
    .app-wrapper { flex-direction: row; }
    .sidebar { width: 240px; }
}