/* style.css - (FINAL FIX: Centering, Search Bar Design Restored and UPDATED Badge) */

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

:root {
    --primary-color: #00f3ff;
    --secondary-color: #bc13fe;
    --bg-color: #0a0a0f;
    --glass-bg: rgba(20, 20, 30, 0.7);
    --card-bg: rgba(0, 0, 0, 0.6);
}

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

body {
    background: linear-gradient(135deg, #0a0a0f, #1a1a2e);
    min-height: 100vh;
    color: white;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(188, 19, 254, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 243, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(188, 19, 254, 0.05) 0%, transparent 50%);
    z-index: -1;
}

/* Common Styles */
h1, h2, h3 {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

.highlight {
    color: var(--primary-color);
    text-shadow: 0 0 15px var(--primary-color);
}
.hidden, .hidden-form {
    display: none !important;
}
.message {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
}

/* --- Navigation Bar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 1.5rem;
    color: white;
}
.logout-btn {
    background: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.logout-btn:hover {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 0 15px var(--secondary-color);
}


/* --- 1. Login/Auth Page Styles (index.html) --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}
.main-container {
    width: 100%;
    max-width: 420px;
    text-align: center;
}
.logo-header {
    margin-bottom: 40px;
}
.logo-header h1 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.input-group {
    position: relative;
    margin-bottom: 20px;
}
.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}
.input-group input {
    width: 100%;
    padding: 15px 20px 15px 45px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    color: white;
    outline: none;
}
.neon-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.neon-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px var(--primary-color);
}
.switch-text {
    color: #aaa;
    font-size: 0.9rem;
}
.switch-text span {
    color: var(--primary-color);
    cursor: pointer;
    font-weight: bold;
}


/* --- 2. Dashboard Styles (dashboard.html) --- */
.container {
    max-width: 1200px;
    margin: 0 auto; /* FIX: কন্টেইনারকে মাঝখানে আনবে */
    padding: 40px 20px;
}
.dashboard-header {
    text-align: center;
    margin-bottom: 50px;
}
.progress-summary {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 40px;
    border: 1px solid rgba(255,255,255,0.1);
}
.progress-summary > div {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
/* FIX: Search Bar Design and Centering */
.filter-section {
    margin-bottom: 30px;
    display: flex;
    justify-content: center; /* FIX: সার্চ বারকে মাঝখানে আনার জন্য */
}
#course-search {
    padding: 12px 25px;
    width: 100%;
    max-width: 500px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}
#course-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}
/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}
.course-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.course-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 35px rgba(0, 243, 255, 0.2);
}
.card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-shadow: 0 0 20px var(--primary-color);
}
.access-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    width: 100%;
}
.updated-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #00ff00; /* Neon Green */
    color: black;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 5px;
    z-index: 10;
    box-shadow: 0 0 5px #00ff00;
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-content {
    background: #111;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.3);
    width: 90%;
    max-width: 400px;
    padding: 40px;
    text-align: center;
    border-radius: 15px;
    position: relative;
}
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #aaa;
}
#access-code {
    font-size: 2rem;
    letter-spacing: 10px;
    text-align: center;
    border-radius: 10px;
    margin: 20px 0;
    padding: 15px;
    width: 100%;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
}
.error-text {
    color: #ff6b6b;
    margin-top: 10px;
    font-weight: bold;
}


/* --- 3. Player Page Styles (player.html) --- */
.player-container {
    max-width: 1200px; 
    width: 100%;
    margin: 0 auto; /* FIX: কন্টেইনারকে মাঝখানে আনবে */
    padding: 20px 20px 40px;
}
.video-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.video-wrapper {
    flex: 2;
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    overflow: hidden;
    background: #000;
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.notes-section {
    flex: 1;
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.1);
}
#notes-text {
    width: 100%;
    height: 300px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    color: white;
    resize: vertical;
    outline: none;
}
.notes-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.save-btn, .download-btn, .clear-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
    min-width: 80px;
    transition: 0.3s;
}
.save-btn { background: var(--primary-color); color: black; }
.download-btn { background: var(--secondary-color); color: white; }
.clear-btn { background: #ff6b6b; color: white; }
.back-btn {
    background: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    font-weight: bold;
}


/* --- Responsive Design --- */
@media (min-width: 992px) {
    .video-section {
        flex-direction: row; 
    }
}
@media (max-width: 768px) {
    .course-grid {
        grid-template-columns: 1fr;
    }
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    .progress-summary > div {
        flex-direction: column;
        gap: 15px;
    }
}
@media (max-width: 480px) {
    .container, .player-container, .login-body {
        padding: 15px;
    }
    .logo-header h1 {
        font-size: 2rem;
    }
}