:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* --- Login Screen --- */
#login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.glow-orb {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    background: var(--accent-blue);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    z-index: -1;
}

.login-card h2 {
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.input-group label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 1rem;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: -0.5rem;
    left: 0.8rem;
    font-size: 0.75rem;
    background: var(--bg-color);
    padding: 0 0.4rem;
    color: var(--accent-blue);
}

.error {
    color: var(--error);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: left;
}
.error.hidden { display: none; }

.btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.primary-btn .arrow {
    transition: transform 0.3s ease;
}
.primary-btn:hover .arrow {
    transform: translateX(4px);
}

/* --- Dashboard --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin: 1.5rem 2rem;
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}
.logo span {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    margin-left: 0.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 0.8rem;
    border: 2px solid rgba(255,255,255,0.2);
}

.dashboard {
    padding: 0 2rem 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 2.5rem;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.grid-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.card {
    padding: 2rem;
}

.card-header {
    margin-bottom: 1.5rem;
}

.tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    margin-bottom: 0.8rem;
    display: inline-block;
}
.tag.purple { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.tag.blue { background: rgba(14, 165, 233, 0.2); color: #38bdf8; }

.card-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.task-image {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.image-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-wrapper:hover .image-overlay { opacity: 1; }
.image-wrapper:hover .task-image { transform: scale(1.02); }

.secondary-btn {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    width: auto;
    padding: 0.8rem 1.5rem;
    color: white;
}
.secondary-btn:hover { background: rgba(255,255,255,0.3); }

.task-instructions {
    background: rgba(255,255,255,0.03);
    padding: 1.2rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-blue);
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.6;
}

.vocab-list {
    list-style: none;
}
.vocab-list li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
}
.vocab-list li:last-child { border-bottom: none; }

.vocab-list .word {
    font-weight: 600;
    font-size: 1.05rem;
    color: #f1f5f9;
}
.vocab-list .hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.reading-card {
    margin-top: 2rem;
}

.content-placeholder {
    position: relative;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    text-align: center;
}

.blurred-text {
    color: var(--text-secondary);
    filter: blur(4px);
    user-select: none;
    margin-bottom: 1rem;
}

.outline-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-secondary);
    cursor: not-allowed;
    width: auto;
    margin: 0 auto;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s forwards;
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}
.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 968px) {
    .grid-container { grid-template-columns: 1fr; }
}
