/* assets/css/style.css */
:root {
    --bg-dark: #030308;
    --text-color: #f0f0ff;
    --text-muted: #8b8ba7;
    --primary-color: #9d4edd;
    --primary-glow: rgba(157, 78, 221, 0.6);
    --secondary-color: #3c096c;
    --accent-color: #00f5d4;
    --accent-glow: rgba(0, 245, 212, 0.4);
    --danger-color: #ff006e;
    --success-color: #06d6a0;
    --card-bg: rgba(16, 16, 28, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-color);
    font-family: var(--font-main);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(60, 9, 108, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 245, 212, 0.1), transparent 25%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Starry background effect */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="0.5" fill="%23fff" opacity="0.3"/><circle cx="50" cy="80" r="0.8" fill="%23fff" opacity="0.5"/><circle cx="150" cy="40" r="0.4" fill="%23fff" opacity="0.2"/><circle cx="180" cy="150" r="1" fill="%23fff" opacity="0.6"/><circle cx="90" cy="120" r="0.6" fill="%23fff" opacity="0.4"/></svg>');
    background-size: 100px 100px;
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.login-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    z-index: 1;
}

h1.cosmic-title {
    font-size: 3rem;
    letter-spacing: 6px;
    margin-bottom: 5px;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 0 20px var(--primary-glow), 0 0 40px var(--accent-glow);
    animation: pulse 4s infinite alternate;
}

.cosmic-subtitle {
    margin-bottom: 40px; 
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 1px;
}

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

.login-box {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 40px 30px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, opacity 0.4s ease;
}

.login-box p {
    font-size: 1.05rem;
    margin-bottom: 20px;
    color: #fff;
}

input.cosmic-input, select.cosmic-input, textarea.cosmic-input {
    width: 100%;
    padding: 16px 20px;
    margin: 15px 0;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    border-radius: 12px;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 2px;
    font-family: var(--font-main);
    transition: all 0.3s ease;
}
textarea.cosmic-input { text-align: left; letter-spacing: normal; }
select.cosmic-input { appearance: none; text-align: left; background-image: url('data:image/svg+xml;utf8,<svg fill="%23fff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>'); background-repeat: no-repeat; background-position-x: 95%; background-position-y: 50%; }
select.cosmic-input option { background: var(--bg-dark); }

input.cosmic-input:focus, select.cosmic-input:focus, textarea.cosmic-input:focus { 
    outline: none; 
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-glow); 
    background: rgba(0,0,0,0.6);
}

button.btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 16px 25px;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 1px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

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

button.btn:hover { 
    box-shadow: 0 0 20px var(--primary-glow); 
    transform: translateY(-2px);
}
button.btn:hover::before { left: 100%; }

button.btn:disabled { 
    background: #222; color: #666; cursor: not-allowed; box-shadow: none; transform: none; 
}
button.btn:disabled::before { display: none; }

.hidden { display: none !important; }

/* Dashboard layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.header {
    padding: 20px 25px;
    background: rgba(10, 10, 20, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header h2 {
    color: #fff;
    letter-spacing: 2px;
    font-size: 1.4rem;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    padding-bottom: 90px; /* Space for bottom nav */
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 100;
}
.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}
.nav-item.active { 
    color: var(--accent-color); 
    transform: translateY(-3px);
}
.nav-item i { font-size: 1.6rem; margin-bottom: 4px; }
.nav-item span:first-child { font-size: 1.5rem; margin-bottom: 4px; filter: grayscale(100%); transition: all 0.3s ease; }
.nav-item.active span:first-child { filter: none; text-shadow: 0 0 10px var(--accent-glow); }

/* Cards & Lists */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, border-color 0.3s ease;
}
.card:hover {
    border-color: rgba(157, 78, 221, 0.3);
}

.topic-title { 
    font-size: 1.3rem; 
    color: var(--accent-color); 
    margin-bottom: 8px; 
    font-family: var(--font-heading);
}
.topic-meta { 
    font-size: 0.75rem; 
    color: var(--primary-color); 
    margin-bottom: 15px; 
    font-weight: 600;
    letter-spacing: 1px;
}

/* User Selection Buttons */
.user-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.2s;
}
.user-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--secondary-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

/* Desktop adjustments */
@media (min-width: 768px) {
    .app-container { flex-direction: row; }
    .bottom-nav {
        position: static;
        flex-direction: column;
        width: 250px;
        height: 100vh;
        border-top: none;
        border-right: 1px solid var(--glass-border);
        justify-content: flex-start;
        padding-top: 30px;
        background: rgba(10, 10, 20, 0.6);
    }
    .nav-item { 
        flex-direction: row; 
        padding: 15px 30px; 
        font-size: 1.1rem; 
        width: 100%;
        justify-content: flex-start;
    }
    .nav-item span:first-child { margin-right: 15px; margin-bottom: 0; }
    .nav-item.active { transform: translateX(5px); border-left: 3px solid var(--accent-color); }
    .main-content { padding-bottom: 30px; }
}
