:root {
    --bg-dark: #0f111a;
    --bg-panel: rgba(25, 28, 41, 0.7);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #10b981;
    --success: #10b981;
    --success-hover: #059669;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    font-family: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

/* Header */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(15, 17, 26, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.highlight {
    color: var(--primary);
}

.countdown {
    font-weight: 500;
    color: var(--text-muted);
}

.badge {
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 700;
}

.user-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}

#progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
}

.progress-bar-container {
    width: 150px;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--secondary);
    width: 0%;
    transition: width 0.5s ease;
}

/* Main Layout */
.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: var(--bg-panel);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.sidebar-title {
    padding: 1.5rem;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border);
}

.week-group {
    border-bottom: 1px solid var(--border);
}

.week-header {
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    transition: background 0.2s;
}

.week-header:hover {
    background: rgba(255,255,255,0.05);
}

.day-item {
    padding: 0.8rem 1.5rem 0.8rem 2.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.2s;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.day-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-main);
}

.day-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.day-item.completed .status-dot {
    background-color: var(--secondary);
    box-shadow: 0 0 8px var(--secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border);
    display: inline-block;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    position: relative;
}

.welcome-card {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    max-width: 600px;
    margin: 10vh auto;
    box-shadow: var(--glass-shadow);
}

.welcome-card h2 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.welcome-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* Study Card */
.study-card {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    animation: fadeIn 0.4s ease-out;
}

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

.study-header {
    margin-bottom: 2rem;
}

.tag {
    display: inline-block;
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#study-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.study-date {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Video */
.video-container {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-link-wrapper {
    padding: 3rem 2rem;
    text-align: center;
    background: rgba(255,255,255,0.02);
}

.video-link-wrapper p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

/* Material */
.material-container {
    margin-bottom: 2rem;
}

.material-container h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--primary);
}

.material-content {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 1.05rem;
}

.material-content ul {
    margin-left: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.material-content li {
    margin-bottom: 0.5rem;
}

.material-content p {
    margin-bottom: 1rem;
}

.material-content strong {
    color: var(--text-main);
}

/* Buttons */
button {
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-success:hover {
    background: var(--success-hover);
}

.btn-youtube {
    display: inline-block;
    background: #ef4444;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-youtube:hover {
    background: #dc2626;
}

/* App Wrapper e Login Screen */
#app-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
}

.login-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-card {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    padding: 3rem;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--glass-shadow);
}

.login-card h2 { color: var(--primary); margin-bottom: 1rem; }
.login-card p { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.95rem; }

.login-input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
}

.login-input:focus {
    outline: none;
    border-color: var(--primary);
}

.login-error {
    color: #ef4444 !important;
    margin-top: 1rem;
    margin-bottom: 0 !important;
}
