@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.5);
    --secondary: #818cf8;
    --bg-body: #0f172a;
    --bg-sidebar: rgba(15, 23, 42, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --font-main: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: ''; position: fixed; inset: 0;
    background: 
        radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(129, 140, 248, 0.08), transparent 25%);
    z-index: -1; pointer-events: none;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.dashboard-container { display: flex; min-height: 100vh; }
.main-content { margin-left: 260px; width: calc(100% - 260px); display: flex; flex-direction: column; }
.content-area { padding: 30px; flex-grow: 1; }

.sidebar {
    width: 260px; background: var(--bg-sidebar); backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-glass);
    position: fixed; inset: 0 auto 0 0; padding: 20px; overflow-y: auto;
    z-index: 1100; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--border-glass); }
.sidebar-header .logo { display: flex; align-items: center; font-size: 1.4rem; font-weight: 800; letter-spacing: 1px; text-decoration: none; }
.sidebar-header .logo span { color: #fff; }
.sidebar-header .logo .logo-pass { color: var(--primary); text-shadow: 0 0 10px var(--primary-glow); }

.sidebar-menu { list-style: none; }
.menu-header { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; margin: 25px 0 10px 10px; }
.menu-item { margin-bottom: 5px; }
.menu-item a {
    display: flex; align-items: center; gap: 15px; padding: 12px 15px;
    border-radius: 10px; text-decoration: none; color: var(--text-muted); font-weight: 500; transition: 0.2s;
}
.menu-item a i { font-size: 1.1rem; width: 20px; text-align: center; }
.menu-item a:hover, .menu-item.active a { background: rgba(56, 189, 248, 0.1); color: var(--primary); }
.menu-item a:hover i, .menu-item.active a i { color: var(--primary); text-shadow: 0 0 8px var(--primary-glow); }

.top-bar {
    background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glass); padding: 15px 30px;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100;
}
.top-bar .page-title h2 { font-size: 1.4rem; color: #fff; display: flex; align-items: center; gap: 12px; }
.top-bar .page-title i { color: var(--primary); }

.user-info { display: flex; align-items: center; gap: 15px; }
.user-info .fa-bell { font-size: 1.2rem; color: var(--text-muted); cursor: pointer; }
.user-profile {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.05); padding: 6px 15px;
    border-radius: 30px; border: 1px solid var(--border-glass);
}
.user-profile img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--primary); }
.user-profile span { font-weight: 500; color: #fff; font-size: 0.9rem; }

.music-toggle {
    background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid var(--border-glass);
    width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: 0.3s;
}
.music-toggle:hover { background: var(--primary); box-shadow: 0 0 15px var(--primary-glow); }

.card {
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: 16px; padding: 25px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.alert-box {
    background: rgba(234, 179, 8, 0.1); border: 1px solid rgba(234, 179, 8, 0.3);
    display: flex; padding: 15px 20px; border-radius: 12px; margin-bottom: 30px;
}
.alert-box i { font-size: 1.5rem; margin-right: 15px; color: #fbbf24; }
.alert-box .alert-content h4 { color: #fbbf24; margin-bottom: 4px; font-size: 0.95rem; }
.alert-box .alert-content p { color: var(--text-muted); font-size: 0.85rem; }

.input-section h2 {
    color: var(--primary); margin-bottom: 20px; padding-bottom: 15px;
    border-bottom: 1px solid var(--border-glass); display: flex; align-items: center; font-size: 1.2rem;
}
.input-section h2 .icon i { margin-right: 10px; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-muted); font-size: 0.9rem; }

input[type="file"], textarea {
    width: 100%; padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border-glass);
    border-radius: 10px; color: #fff; font-family: monospace; font-size: 0.9rem;
    transition: all 0.3s ease;
}
textarea { min-height: 150px; resize: vertical; }
input[type="file"]:focus, textarea:focus { outline: none; border-color: var(--primary); background: rgba(0, 0, 0, 0.5); }

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #06b6d4); color: #fff;
    font-size: 1rem; font-weight: 600; width: 100%; margin-top: 10px; padding: 14px;
    border-radius: 12px; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(6, 182, 212, 0.2);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4); }
.btn-primary.loading { background: #334155; color: #94a3b8; cursor: not-allowed; box-shadow: none; }

.btn-download {
    background: rgba(255, 255, 255, 0.05); color: var(--text-main);
    font-size: 0.8rem; padding: 6px 12px; border: 1px solid var(--border-glass);
    border-radius: 6px; cursor: pointer; transition: 0.3s;
}
.btn-download:hover { background: var(--primary); border-color: var(--primary); color: #000; }

.output-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.output-box { display: flex; flex-direction: column; height: 100%; }
.output-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.output-header h3 { color: var(--primary); font-size: 0.9rem; font-weight: 700; text-transform: uppercase; }
.output-box textarea { flex-grow: 1; min-height: 200px; background: rgba(0, 0, 0, 0.4); font-size: 0.85rem; }

footer { text-align: center; margin-top: 40px; padding: 20px; border-top: 1px solid var(--border-glass); color: var(--text-muted); font-size: 0.85rem; }
footer strong { color: var(--primary); }

.modal-overlay {
    position: fixed; inset: 0;
    background-color: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 2000;
}
.modal-overlay.show { opacity: 1; visibility: visible; }

.modal-content {
    background: #1e293b; border: 1px solid var(--border-glass); color: #fff;
    border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    width: 90%; max-width: 420px; transform: translateY(-20px); transition: 0.3s;
    display: flex; flex-direction: column;
}
.modal-overlay.show .modal-content { transform: translateY(0); }

.modal-header {
    padding: 15px 20px; background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border-glass); display: flex; align-items: center; gap: 12px;
}
.modal-header h3 { font-size: 1.1rem; color: #fff; font-weight: 600; margin: 0; }
.modal-icon { font-size: 1.3rem; color: var(--primary); }
.close-button { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; margin-left: auto; }

.modal-body { padding: 20px; font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }
.modal-body h2 { color: #fff; font-size: 1.3rem; margin-bottom: 10px; }

.modal-footer {
    padding: 15px 20px; background: rgba(0,0,0,0.2);
    border-top: 1px solid var(--border-glass); display: flex; justify-content: flex-end;
}

.modal-overlay.dark-modal .modal-content { background: #0f172a; border: 1px solid #334155; }
.modal-overlay.dark-modal .modal-body h2 { color: #fff; font-size: 1.3rem; margin-bottom: 10px; }

.modal-footer.split {
    display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 15px;
}
.modal-title-group { display: flex; flex-direction: column; }
.modal-title-group span { font-size: 0.8rem; color: var(--text-muted); }

#modal-ok-button, #welcome-understood-btn {
    background: var(--primary); color: #000; font-weight: 600;
    padding: 10px 24px; border-radius: 8px; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-width: 120px;
}
#modal-ok-button:hover, #welcome-understood-btn:hover { background: #fff; box-shadow: 0 0 15px var(--primary-glow); }

.btn-secondary {
    background: transparent; border: 1px solid #475569; color: #cbd5e1;
    padding: 10px 20px; border-radius: 8px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-width: 120px;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #fff; }

.spinner {
    width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.1); border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 8px; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.mobile-nav-toggle { display: none; color: #fff; font-size: 1.4rem; background: none; border: none; cursor: pointer; padding: 5px; }
.sidebar-overlay {
    position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000; opacity: 0; visibility: hidden; transition: 0.3s;
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); width: 280px; box-shadow: 10px 0 30px rgba(0,0,0,0.5); }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; }
    .mobile-nav-toggle { display: block; }
    .top-bar .user-profile span { display: none; }
    .sidebar-header .logo { display: none; }
}

@media (max-width: 768px) {
    .top-bar { padding: 12px 20px; }
    .content-area { padding: 15px; }
    .output-grid { grid-template-columns: 1fr; }
    .card { padding: 20px; }
    .input-section h2 { font-size: 1.1rem; }
    
    .modal-footer.split { flex-direction: column-reverse; gap: 10px; }
    #welcome-understood-btn, .btn-secondary { width: 100%; padding: 12px; }
}
