/* =================================== */
/*   TECHVERSE STUDY THEME — SHARED    */
/*   Used by all inner pages           */
/* =================================== */

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

:root{
    --primary:#2563eb;
    --primary-light:#3b82f6;
    --primary-dark:#1d4ed8;
    --accent:#f59e0b;
    --accent-light:#fbbf24;
    --bg:#f8fafc;
    --bg-white:#ffffff;
    --bg-card:#ffffff;
    --text:#1e293b;
    --text-light:#64748b;
    --text-white:#ffffff;
    --border:#e2e8f0;
    --shadow:0 1px 3px rgba(0,0,0,0.08),0 1px 2px rgba(0,0,0,0.06);
    --shadow-md:0 4px 6px rgba(0,0,0,0.07),0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg:0 10px 25px rgba(0,0,0,0.1),0 4px 10px rgba(0,0,0,0.05);
    --radius:16px;
    --radius-sm:10px;
}

html{scroll-behavior:smooth;}

body{
    font-family:'Inter','Poppins',sans-serif;
    background:var(--bg);
    color:var(--text);
    min-height:100vh;
}

/* ======== HEADER ======== */
.header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:16px 8%;
    background:var(--bg-white);
    border-bottom:1px solid var(--border);
    position:sticky;
    top:0;
    z-index:100;
}

.logo{
    font-size:22px;
    font-weight:800;
    color:var(--primary);
}

.home-btn,
.back{
    text-decoration:none;
    color:var(--primary);
    border:1.5px solid var(--primary);
    padding:8px 22px;
    border-radius:50px;
    font-size:14px;
    font-weight:600;
    transition:all 0.3s;
}

.home-btn:hover,
.back:hover{
    background:var(--primary);
    color:white;
}

/* ======== HERO / TITLE AREA ======== */
.courses-hero,
.hero{
    padding:48px 8% 32px;
    text-align:center;
    background:linear-gradient(135deg,#1e3a5f 0%,#2563eb 50%,#1e40af 100%);
}

.courses-title,
.course-title{
    font-size:42px;
    font-weight:800;
    color:var(--text-white);
    letter-spacing:-0.5px;
    line-height:1.2;
    margin-bottom:10px;
    -webkit-text-fill-color:initial;
    background:none;
    -webkit-background-clip:initial;
}

.courses-subtitle,
.course-subtitle{
    font-size:16px;
    color:rgba(255,255,255,0.75);
    font-weight:400;
    margin-top:8px;
    position:relative;
    display:inline-block;
}

.courses-subtitle::after,
.course-subtitle::after{
    content:"";
    display:block;
    height:3px;
    width:60px;
    margin:14px auto 0;
    background:var(--accent);
    border-radius:4px;
    animation:none;
}

/* ======== SEARCH BOX ======== */
.search-container{
    max-width:500px;
    margin:28px auto 28px;
    padding:0 20px;
    position:relative;
}

.search-box{
    width:100%;
    padding:14px 20px 14px 48px;
    border-radius:50px;
    border:1.5px solid var(--border);
    background:var(--bg-white);
    color:var(--text);
    font-family:inherit;
    font-size:15px;
    outline:none;
    transition:all 0.3s;
    box-shadow:var(--shadow);
}

.search-box::placeholder{
    color:var(--text-light);
}

.search-box:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(37,99,235,0.12);
}

.search-icon{
    position:absolute;
    left:38px;
    top:50%;
    transform:translateY(-50%);
    color:var(--text-light);
    font-size:16px;
    pointer-events:none;
}

.no-results{
    text-align:center;
    padding:30px 20px;
    color:var(--text-light);
    font-size:14px;
    display:none;
}

/* ======== COURSE CARDS GRID ======== */
.courses{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
    gap:24px;
    padding:10px 8% 60px;
}

.course-card{
    background:var(--bg-card);
    border-radius:var(--radius);
    border:1px solid var(--border);
    overflow:hidden;
    transition:all 0.3s ease;
    position:relative;
}

.course-card::before{
    display:none;
}

.course-card:hover{
    transform:translateY(-6px);
    box-shadow:var(--shadow-lg);
    border-color:var(--primary-light);
}

.course-img{
    width:100%;
    height:180px;
    object-fit:cover;
    border-bottom:1px solid var(--border);
}

.course-card h3{
    padding:16px 20px 6px;
    font-size:17px;
    font-weight:700;
    color:var(--text);
}

.course-card p{
    padding:0 20px 16px;
    font-size:13px;
    color:var(--text-light);
    line-height:1.5;
}

.enroll-btn{
    display:inline-block;
    margin:0 20px 20px;
    padding:10px 24px;
    border-radius:50px;
    border:1.5px solid var(--primary);
    color:var(--primary);
    text-decoration:none;
    font-size:14px;
    font-weight:600;
    transition:all 0.3s;
}

.enroll-btn:hover{
    background:var(--primary);
    color:white;
}

/* ======== PLAYER PAGE ======== */
.player-section{
    max-width:900px;
    margin:30px auto 0;
    padding:0 20px;
}

.player-wrapper{
    position:relative;
    width:100%;
    padding-bottom:56.25%;
    border-radius:var(--radius);
    overflow:hidden;
    border:2px solid var(--border);
    box-shadow:var(--shadow-lg);
    background:#000;
}

.player-wrapper iframe,
.player-wrapper #player{
    position:absolute;
    top:0;left:0;width:100%;height:100%;border:none;
}

.now-playing{
    max-width:900px;
    margin:16px auto 0;
    padding:0 20px;
    text-align:center;
    font-size:15px;
    color:var(--text-light);
}

.now-playing span{
    color:var(--primary);
    font-weight:600;
}

/* ======== NOTES SECTION ======== */
.notes-section{
    max-width:900px;
    margin:30px auto 0;
    padding:0 20px;
}

.notes-box{
    border-radius:var(--radius);
    background:var(--bg-card);
    border:1px solid var(--border);
    overflow:hidden;
    box-shadow:var(--shadow);
}

.notes-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 20px;
    border-bottom:1px solid var(--border);
    background:var(--bg);
}

.notes-title{
    font-size:15px;
    font-weight:600;
    display:flex;
    align-items:center;
    gap:8px;
    color:var(--text);
}

.notes-title span{color:var(--primary);}

.notes-status{
    font-size:12px;
    color:var(--text-light);
    transition:opacity 0.3s;
}

.notes-status.saved{
    color:var(--primary);
}

.notes-area{
    width:100%;
    min-height:180px;
    padding:18px 20px;
    background:var(--bg-white);
    border:none;
    outline:none;
    color:var(--text);
    font-family:inherit;
    font-size:14px;
    line-height:1.7;
    resize:vertical;
}

.notes-area::placeholder{color:var(--text-light);}

.notes-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    padding:12px 20px;
    border-top:1px solid var(--border);
    background:var(--bg);
}

.notes-btn{
    padding:8px 22px;
    border-radius:50px;
    border:none;
    cursor:pointer;
    font-family:inherit;
    font-size:13px;
    font-weight:600;
    transition:all 0.3s;
}

.save-btn{
    background:var(--primary);
    color:white;
}

.save-btn:hover{
    background:var(--primary-dark);
    transform:translateY(-1px);
    box-shadow:0 4px 12px rgba(37,99,235,0.3);
}

.clear-btn{
    background:var(--bg);
    color:var(--text-light);
    border:1px solid var(--border);
}

.clear-btn:hover{
    background:var(--border);
    color:var(--text);
}

/* ======== DAY / LESSON CARDS ======== */
.days-section{
    max-width:1100px;
    margin:40px auto 0;
    padding:0 20px 60px;
}

.days-heading{
    font-size:24px;
    font-weight:700;
    margin-bottom:20px;
    text-align:center;
    color:var(--text);
}

.days-heading span{color:var(--primary);}

.days-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
    gap:12px;
}

.day-card{
    padding:14px 12px;
    text-align:left;
    border-radius:var(--radius-sm);
    background:var(--bg-card);
    border:1px solid var(--border);
    cursor:pointer;
    transition:all 0.3s ease;
    user-select:none;
    display:flex;
    align-items:center;
    gap:12px;
}

.day-card:hover{
    transform:translateY(-3px);
    border-color:var(--primary-light);
    box-shadow:var(--shadow-md);
}

.day-card.active{
    border-color:var(--primary);
    background:rgba(37,99,235,0.06);
    box-shadow:0 0 0 3px rgba(37,99,235,0.1);
}

.day-badge{
    min-width:44px;
    height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:var(--radius-sm);
    background:rgba(37,99,235,0.08);
    font-size:15px;
    font-weight:700;
    color:var(--primary);
}

.day-topic{
    font-size:13px;
    color:var(--text-light);
    line-height:1.3;
    font-weight:500;
}

/* ======== NEETCODE / DSA ======== */
.stats-bar{
    display:flex;
    gap:16px;
    justify-content:center;
    flex-wrap:wrap;
    margin:0 auto 28px;
    padding:0 8%;
}

.stat-box{
    background:var(--bg-card);
    border:1px solid var(--border);
    border-radius:var(--radius-sm);
    padding:16px 24px;
    text-align:center;
    min-width:120px;
    box-shadow:var(--shadow);
}

.stat-box .num{
    font-size:28px;
    font-weight:800;
    color:var(--primary);
}

.stat-box .label{
    font-size:12px;
    color:var(--text-light);
    text-transform:uppercase;
    letter-spacing:0.5px;
    margin-top:4px;
}

.filter-bar{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    justify-content:center;
    margin:0 auto 28px;
    padding:0 8%;
}

.filter-btn{
    padding:8px 20px;
    border-radius:50px;
    border:1.5px solid var(--border);
    background:var(--bg-card);
    color:var(--text);
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    transition:all 0.3s;
    font-family:inherit;
}

.filter-btn:hover,
.filter-btn.active{
    background:var(--primary);
    color:white;
    border-color:var(--primary);
}

/* Problem cards */
.problems-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(320px,1fr));
    gap:16px;
    padding:0 8% 60px;
}

.problem-card{
    background:var(--bg-card);
    border:1px solid var(--border);
    border-radius:var(--radius-sm);
    padding:20px;
    transition:all 0.3s;
}

.problem-card:hover{
    transform:translateY(-3px);
    box-shadow:var(--shadow-md);
    border-color:var(--primary-light);
}

.problem-card .difficulty{
    display:inline-block;
    padding:3px 10px;
    border-radius:50px;
    font-size:11px;
    font-weight:600;
    text-transform:uppercase;
}

.difficulty.easy{background:#dcfce7;color:#15803d;}
.difficulty.medium{background:#fef3c7;color:#b45309;}
.difficulty.hard{background:#fee2e2;color:#dc2626;}

.problem-card h3{
    font-size:16px;
    font-weight:700;
    margin:10px 0 6px;
    color:var(--text);
}

.problem-card .category{
    font-size:12px;
    color:var(--text-light);
}

.problem-links{
    display:flex;
    gap:8px;
    margin-top:12px;
}

.problem-links a{
    padding:6px 16px;
    border-radius:50px;
    text-decoration:none;
    font-size:12px;
    font-weight:600;
    transition:all 0.3s;
}

.prob-link-primary{
    background:var(--primary);
    color:white;
}

.prob-link-primary:hover{
    background:var(--primary-dark);
}

.prob-link-secondary{
    border:1px solid var(--border);
    color:var(--text);
    background:var(--bg);
}

.prob-link-secondary:hover{
    background:var(--border);
}

/* Checkbox */
.problem-check{
    width:18px;
    height:18px;
    accent-color:var(--primary);
    cursor:pointer;
}

/* Tags */
.tag{
    display:inline-block;
    padding:3px 10px;
    border-radius:50px;
    font-size:11px;
    font-weight:600;
    margin-left:6px;
}

.tag-blind75{background:rgba(245,158,11,0.12);color:#b45309;}

/* ======== CHEATSHEET HUB ======== */
.cheatsheet-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
    gap:20px;
    padding:0 8% 60px;
}

.cheatsheet-card{
    background:var(--bg-card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:28px 20px;
    text-align:center;
    text-decoration:none;
    color:var(--text);
    transition:all 0.3s;
    display:block;
}

.cheatsheet-card:hover{
    transform:translateY(-5px);
    box-shadow:var(--shadow-lg);
    border-color:var(--primary-light);
}

.cheatsheet-card .icon{
    font-size:36px;
    margin-bottom:10px;
    display:block;
}

.cheatsheet-card h3{
    font-size:16px;
    font-weight:700;
}

.cheatsheet-card p{
    font-size:12px;
    color:var(--text-light);
    margin-top:6px;
}

/* ======== CHEATSHEET VIEWER ======== */
.viewer-content{
    max-width:1000px;
    margin:0 auto;
    padding:24px 20px 60px;
}

.viewer-section{
    background:var(--bg-card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    margin-bottom:20px;
    overflow:hidden;
}

.viewer-section h3{
    padding:16px 20px;
    font-size:16px;
    font-weight:700;
    background:var(--bg);
    border-bottom:1px solid var(--border);
    color:var(--text);
}

.viewer-section ul{
    list-style:none;
    padding:16px 20px;
}

.viewer-section li{
    padding:8px 0;
    border-bottom:1px solid var(--border);
    font-size:14px;
    color:var(--text-light);
}

.viewer-section li:last-child{border-bottom:none;}

.viewer-section a{
    color:var(--primary);
    text-decoration:none;
}

.viewer-section a:hover{
    text-decoration:underline;
}

.viewer-section code{
    background:rgba(37,99,235,0.06);
    padding:2px 8px;
    border-radius:4px;
    font-size:13px;
    color:var(--primary-dark);
}

/* ======== LOGIN UI PAGE ======== */
.login-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(350px,1fr));
    gap:24px;
    padding:0 8% 60px;
}

.login-card{
    background:var(--bg-card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    overflow:hidden;
    transition:all 0.3s;
}

.login-card:hover{
    transform:translateY(-5px);
    box-shadow:var(--shadow-lg);
    border-color:var(--primary-light);
}

.login-card iframe{
    width:100%;
    height:280px;
    border:none;
    border-bottom:1px solid var(--border);
    pointer-events:none;
}

.login-card-info{
    padding:16px 20px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.login-card-info h3{
    font-size:15px;
    font-weight:700;
    color:var(--text);
}

.login-card-actions{
    display:flex;
    gap:8px;
}

.login-action-btn{
    padding:8px 18px;
    border-radius:50px;
    border:1.5px solid var(--primary);
    color:var(--primary);
    background:transparent;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    transition:all 0.3s;
    font-family:inherit;
    text-decoration:none;
}

.login-action-btn:hover{
    background:var(--primary);
    color:white;
}

/* ======== PROGRESS BAR ======== */
.progress-bar-wrapper{
    max-width:500px;
    margin:0 auto 28px;
    padding:0 8%;
}

.progress-bar-bg{
    width:100%;
    height:10px;
    background:var(--border);
    border-radius:10px;
    overflow:hidden;
}

.progress-bar-fill{
    height:100%;
    background:linear-gradient(90deg,var(--primary),var(--accent));
    border-radius:10px;
    transition:width 0.5s;
}

.progress-text{
    text-align:center;
    font-size:13px;
    color:var(--text-light);
    margin-top:8px;
    font-weight:500;
}

/* ======== LOADING / ERROR ======== */
.loading{
    text-align:center;
    padding:100px 20px;
    font-size:18px;
    color:var(--text-light);
}

.error{
    text-align:center;
    padding:100px 20px;
    color:#dc2626;
    font-size:18px;
}

/* ======== CODE BLOCK (login ui) ======== */
.code-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.6);
    z-index:999;
    display:none;
    align-items:center;
    justify-content:center;
}

.code-overlay.active{display:flex;}

.code-box{
    background:var(--bg-white);
    border-radius:var(--radius);
    width:90%;
    max-width:800px;
    max-height:80vh;
    overflow:auto;
    padding:24px;
    position:relative;
    box-shadow:var(--shadow-lg);
}

.code-box pre{
    background:#f1f5f9;
    padding:20px;
    border-radius:var(--radius-sm);
    overflow-x:auto;
    font-size:13px;
    line-height:1.6;
    color:var(--text);
}

.code-close-btn{
    position:absolute;
    top:12px;
    right:16px;
    background:var(--bg);
    border:1px solid var(--border);
    border-radius:50%;
    width:36px;
    height:36px;
    cursor:pointer;
    font-size:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--text);
    transition:all 0.3s;
}

.code-close-btn:hover{
    background:var(--border);
}

/* ======== RESPONSIVE ======== */
@media(max-width:768px){
    .courses-title,.course-title{font-size:28px;}
    .courses-subtitle,.course-subtitle{font-size:14px;}
    .courses{grid-template-columns:1fr;padding:10px 5% 40px;}
    .header{padding:14px 5%;}
    .courses-hero,.hero{padding:36px 5% 24px;}
    .days-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px;}
    .day-card{padding:10px;}
    .day-badge{min-width:38px;height:38px;font-size:13px;}
    .day-topic{font-size:12px;}
    .problems-grid{grid-template-columns:1fr;padding:0 5% 40px;}
    .login-grid{grid-template-columns:1fr;padding:0 5% 40px;}
    .cheatsheet-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));padding:0 5% 40px;}
    .filter-bar{padding:0 5%;}
    .stats-bar{padding:0 5%;}
}

@media(max-width:480px){
    .courses-title,.course-title{font-size:22px;}
    .days-grid{grid-template-columns:1fr;gap:6px;}
    .logo{font-size:18px;}
    .problems-grid{grid-template-columns:1fr;}
    .cheatsheet-grid{grid-template-columns:1fr;}
}
