* { margin:0; padding:0; box-sizing:border-box; }
body {
    background: linear-gradient(135deg, #0a1428 0%, #001233 50%, #0a1428 100%);
    color: #f0f0ff;
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}
header {
    background: linear-gradient(to bottom, rgba(10, 20, 40, 0.92), rgba(0, 18, 51, 0.92));
    backdrop-filter: blur(10px);
    padding: 1.4rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}
.logo {
    display: flex;
    align-items: center;
    font-family: 'Cinzel', serif;
    font-size: 2.3rem;
    color: #d4af37;
    text-shadow: 0 3px 12px rgba(212,175,55,0.5);
}
.logo img { width: 60px; height: 60px; margin-right: 12px; border-radius: 50%; }
nav { display: flex; gap: 1.2rem; }
.nav-btn {
    background: linear-gradient(90deg, #d4af37, #e8c670);
    color: #0a1428;
    border: none;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.nav-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(212,175,55,0.5); }
main { max-width: 1400px; margin: 2rem auto; padding: 0 1.5rem; }
.slideshow {
    height: 38vh;
    min-height: 260px;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 2.5rem;
    box-shadow: 0 15px 50px rgba(0,0,0,0.6);
}
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.3s ease, transform 1.3s ease;
    transform: scale(1.04);
}
.slide.active { opacity: 1; transform: scale(1); }
.slide img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
h1, h2 {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    text-shadow: 0 3px 12px rgba(0,0,0,0.5);
    text-align: center;
    margin-bottom: 1.6rem;
}
h1 { font-size: 3.2rem; }
h2 { font-size: 2.3rem; }
.classes-grid, .subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8rem;
}
.class-btn, .subject-btn {
    background: linear-gradient(90deg, #d4af37, #e8c670);
    color: #0a1428;
    border: none;
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.class-btn:hover, .subject-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(212,175,55,0.4);
}
.chapters-list > div {
    background: linear-gradient(145deg, #112347, #0a1a38);
    border: 1px solid #d4af3740;
    border-radius: 16px;
    padding: 1.6rem;
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 12px 35px rgba(0,0,0,0.5);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}
.chapters-list > div::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: conic-gradient(from 0deg at 50% 50%, #d4af37 0%, transparent 30%, #d4af37 60%, transparent 90%);
    opacity: 0.12;
    animation: royalGlow 10s linear infinite;
    pointer-events: none;
}
@keyframes royalGlow { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.chapters-list > div:hover {
    transform: translateY(-10px);
    border-color: #d4af37;
    box-shadow: 0 20px 50px rgba(212,175,55,0.35);
}
.chapters-list > div:hover::before { opacity: 0.3; }
.chapter-start-btn {
    background: linear-gradient(90deg, #d4af37, #e8c670);
    color: #0a1428;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.chapter-start-btn:hover { transform: scale(1.06); box-shadow: 0 8px 20px rgba(212,175,55,0.4); }
.back-btn {
    background: transparent;
    border: 2px solid #d4af37;
    color: #d4af37;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 1rem 0;
}
.back-btn:hover { background: #d4af3715; transform: translateY(-3px); }
.quiz-container {
    background: linear-gradient(145deg, #112347, #0a1a38);
    border: 1px solid #d4af3740;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}
#quizTitle { font-size: 2rem; margin-bottom: 1.5rem; }
#timer { font-size: 1.2rem; color: #d4af37; text-align: right; margin-bottom: 1rem; }
.question {
    margin-bottom: 2rem;
    padding: 1.2rem;
    background: rgba(10,20,40,0.5);
    border-radius: 12px;
}
.question h4 { color: #d4af37; margin-bottom: 1rem; }
.question label {
    display: block;
    margin: 0.6rem 0;
    cursor: pointer;
}
.question input { margin-right: 0.8rem; }
#submitQuiz {
    background: linear-gradient(90deg, #d4af37, #e8c670);
    color: #0a1428;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    display: block;
    margin: 2rem auto 0;
}
#submitQuiz:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(212,175,55,0.4); }
#result {
    display: none;
    text-align: center;
}
.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.stat {
    background: rgba(10,20,40,0.7);
    padding: 1rem;
    border-radius: 12px;
}
.stat h3 { color: #d4af37; }
#resultChart { max-width: 400px; margin: 2rem auto; }
.history-container {
    background: linear-gradient(145deg, #112347, #0a1a38);
    border: 1px solid #d4af3740;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}
.history-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
#historyChart { margin: 2rem 0; }
#historyTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}
#historyTable th, #historyTable td {
    padding: 1rem;
    border: 1px solid #d4af3740;
    text-align: left;
}
#historyTable th { background: rgba(212,175,55,0.2); color: #d4af37; }
.filters {
    margin: 2rem auto 1rem;
    max-width: 1100px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    padding: 0 1rem;
}
input, select, button {
    padding: 12px 18px;
    font-size: 1.05rem;
    border: 1px solid #d4af3760;
    border-radius: 10px;
    background: rgba(10, 20, 40, 0.7);
    color: #f0f0ff;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}
input:focus, select:focus {
    border-color: #d4af37;
    box-shadow: 0 0 18px rgba(212,175,55,0.4);
    outline: none;
}
button {
    background: linear-gradient(90deg, #d4af37, #e8c670);
    color: #0a1428;
    font-weight: 600;
    cursor: pointer;
    border: none;
}
button:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(212,175,55,0.5); }
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2rem;
}
.card {
    background: linear-gradient(145deg, #112347, #0a1a38);
    border: 1px solid #d4af3740;
    border-radius: 16px;
    padding: 1.8rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 12px 35px rgba(0,0,0,0.5);
}
.card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: conic-gradient(from 0deg at 50% 50%, #d4af37 0%, transparent 30%, #d4af37 60%, transparent 90%);
    opacity: 0.15;
    animation: royalGlow 8s linear infinite;
    pointer-events: none;
    border-radius: 16px;
}
.card:hover {
    transform: translateY(-10px);
    border-color: #d4af37;
    box-shadow: 0 20px 50px rgba(212,175,55,0.3);
}
.card:hover::before { opacity: 0.35; }
.card h3 {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.card p {
    line-height: 1.6;
    color: #d0d8ff;
    margin-bottom: 1.4rem;
}
.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-view {
    background: linear-gradient(90deg, #d4af37, #e8c670);
    color: #0a1428;
}
.btn-download {
    background: transparent;
    border: 2px solid #d4af37;
    color: #d4af37;
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212,175,55,0.4);
}
.modal {
    position: fixed;
    inset: 0;
    background: rgba(5,10,25,0.95);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.modal-content {
    background: linear-gradient(135deg, #0f1e3a, #0a1428);
    width: 100%;
    max-width: 1200px;
    height: 94vh;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #d4af3760;
    box-shadow: 0 0 60px rgba(212,175,55,0.25);
}
.modal-header {
    background: linear-gradient(90deg, #d4af37, #e8c670);
    color: #0a1428;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
}
.close {
    background: #8b0000;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}
.close:hover { background: #a50000; transform: scale(1.1); }
iframe {
    width: 100%;
    height: calc(100% - 60px);
    border: none;
}
.review { background: white; padding: 20px; margin: 15px 0; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); border-left: 6px solid #1976D2; }
.stars { color: #FFD700; font-size: 1.5rem; }
.empty { text-align: center; color: #777; font-size: 1.5rem; margin-top: 50px; }
.intro-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
}
.intro-image {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
    z-index: -1;
}
.intro-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 2px 2px 12px rgba(0,0,0,0.9);
    width: 90%;
    max-width: 1100px;
    z-index: 1;
}
.intro-overlay h1 { font-size: 4rem; margin: 10px 0; }
.intro-overlay p h4 { font-size: 1.7rem; margin: 25px 0; }
.intro-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 50px;
}
.btn-primary {
    background: linear-gradient(90deg, #d4af37, #e8c670);
    color: #0a1428;
    padding: 18px 45px;
    font-size: 1.4rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(212,175,55,0.4);
}
.btn-primary:hover {
    background: #d4af37;
    transform: translateY(-6px);
}
#graph {
    width: 95%;
    max-width: 1500px;
    height: 560px;
    margin: 30px auto;
    border: 2px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    background: white;
}
#equation-inputs {
    text-align: center;
    margin: 30px 0;
}
.equation {
    display: block;
    margin: 15px auto;
    padding: 14px;
    width: 90%;
    max-width: 600px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1.1rem;
}
#add-equation, #plot-graph, #clear-graph {
    background: linear-gradient(90deg, #d4af37, #e8c670);
    color: #0a1428;
    padding: 12px 25px;
    margin: 8px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
}
#add-equation:hover, #plot-graph:hover, #clear-graph:hover {
    transform: translateY(-3px); box-shadow: 0 8px 25px rgba(212,175,55,0.5);
}
#simulation-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}
.simulation-item {
    background: linear-gradient(145deg, #112347, #0a1a38);
    border: 1px solid #d4af3740;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: 0.3s;
    text-align: center;
}
.simulation-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}
.simulation-item h2 {
    background: linear-gradient(90deg, #d4af37, #e8c670);
    color: #0a1428;
    padding: 15px;
    margin: 0;
    font-size: 1.3rem;
}
.simulation-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: 0.3s;
}
.simulation-item:hover img {
    transform: scale(1.05);
}
#search-bar {
    display: block;
    margin: 30px auto;
    padding: 14px;
    width: 90%;
    max-width: 500px;
    border: 2px solid #d4af37;
    border-radius: 50px;
    font-size: 1.1rem;
    text-align: center;
}
.feedback-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(90deg, #d4af37, #e8c670);
    color: #0a1428;
    padding: 16px 24px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 6px 20px rgba(212,175,55,0.5);
    cursor: pointer;
    z-index: 998;
    transition: 0.3s;
}
.feedback-float:hover { background: #e8c670; transform: scale(1.1); }
.feedback-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.feedback-modal.show { display: flex; }
.modal-content {
    background: linear-gradient(135deg, #0f1e3a, #0a1428);
    padding: 40px;
    border-radius: 25px;
    width: 90%;
    max-width: 520px;
    text-align: center;
    position: relative;
    animation: pop 0.4s;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
@keyframes pop { from {transform: scale(0.7); opacity:0} to {transform: scale(1); opacity:1} }
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 36px;
    cursor: pointer;
    color: #999;
}
.close-btn:hover { color: #000; }
.star-rating { font-size: 3.5rem; margin: 20px 0; cursor: pointer; }
.star { color: #ddd; transition: 0.2s; }
.star:hover, .star.selected { color: #FFD700; transform: scale(1.2); }
#feedback-name, #feedback-message {
    width: 100%;
    padding: 14px;
    margin: 12px 0;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 1rem;
}
#submit-feedback {
    background: linear-gradient(90deg, #d4af37, #e8c670);
    color: #0a1428;
    padding: 14px 40px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
}
#submit-feedback:hover { background: #e8c670; }
.subtitle {
    font-size: 1.2rem;
    color: #b0b0ff;
    opacity: 0.9;
}
footer {
    background: linear-gradient(to bottom, rgba(10, 20, 40, 0.9), rgba(0, 18, 51, 0.9));
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}