/* Goodwill - Complete Educational Resource */
/* Professional Styling for WBCHSE Class 12 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, rgb(18, 35, 60) 0%, rgb(30, 60, 90) 50%, rgb(42, 75, 108) 100%);
    color: rgb(255, 255, 255);
    line-height: 1.8;
    min-height: 100vh;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 30px;
}

/* HEADER STYLING */
header {
    background: linear-gradient(135deg, rgb(20, 50, 95) 0%, rgb(35, 70, 120) 100%);
    padding: 50px;
    text-align: center;
    border-radius: 20px;
    border: 5px solid rgb(100, 149, 237);
    margin-bottom: 40px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
}

header h1 {
    font-size: 4em;
    font-weight: bold;
    color: rgb(255, 215, 0);
    margin-bottom: 20px;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

header h2 {
    font-size: 2.5em;
    font-weight: bold;
    color: rgb(173, 216, 230);
    margin-bottom: 15px;
}

header h3 {
    font-size: 1.8em;
    font-weight: bold;
    color: rgb(144, 238, 144);
    margin-bottom: 15px;
}

header h4 {
    font-size: 1.4em;
    font-weight: bold;
    color: rgb(255, 182, 193);
    margin-bottom: 25px;
}

.print-btn {
    background: linear-gradient(135deg, rgb(34, 139, 34) 0%, rgb(50, 205, 50) 100%);
    color: rgb(255, 255, 255);
    border: 4px solid rgb(144, 238, 144);
    padding: 18px 40px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.print-btn:hover {
    background: linear-gradient(135deg, rgb(50, 205, 50) 0%, rgb(34, 139, 34) 100%);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(50, 205, 50, 0.6);
}

/* NAVIGATION */
.topic-nav {
    background: linear-gradient(135deg, rgb(25, 45, 85) 0%, rgb(40, 65, 100) 100%);
    padding: 40px;
    border-radius: 18px;
    border: 5px solid rgb(70, 130, 180);
    margin-bottom: 40px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.topic-nav h3 {
    font-size: 2.5em;
    font-weight: bold;
    color: rgb(255, 215, 0);
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.6);
}

.nav-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.nav-buttons button {
    background: linear-gradient(135deg, rgb(30, 144, 255) 0%, rgb(0, 105, 217) 100%);
    color: rgb(255, 255, 255);
    border: 4px solid rgb(100, 149, 237);
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.nav-buttons button:hover {
    background: linear-gradient(135deg, rgb(0, 191, 255) 0%, rgb(30, 144, 255) 100%);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(30, 144, 255, 0.7);
    border-color: rgb(255, 215, 0);
}

/* TOPIC SECTIONS */
.topic-section {
    background: linear-gradient(135deg, rgb(40, 55, 75) 0%, rgb(50, 65, 85) 100%);
    padding: 50px;
    border-radius: 18px;
    border: 5px solid rgb(95, 158, 160);
    margin-bottom: 40px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.7);
}

.topic-section h2 {
    font-size: 3.2em;
    font-weight: bold;
    color: rgb(255, 215, 0);
    margin-bottom: 35px;
    border-bottom: 6px solid rgb(255, 215, 0);
    padding-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.6);
}

/* CONCEPT BOXES */
.concept-box {
    background: linear-gradient(135deg, rgb(25, 40, 60) 0%, rgb(35, 50, 70) 100%);
    padding: 35px;
    border-radius: 15px;
    border: 4px solid rgb(100, 149, 237);
    margin-bottom: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.concept-box h3 {
    font-size: 2.2em;
    font-weight: bold;
    color: rgb(135, 206, 250);
    margin-bottom: 20px;
}

.concept-box p {
    font-size: 1.2em;
    font-weight: bold;
    color: rgb(240, 248, 255);
    margin-bottom: 18px;
}

.concept-box ul {
    margin-left: 40px;
    margin-top: 20px;
}

.concept-box ul li {
    font-size: 1.15em;
    font-weight: bold;
    color: rgb(240, 248, 255);
    margin-bottom: 15px;
    line-height: 1.8;
}

/* METHOD GRID */
.method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.method-card {
    background: linear-gradient(135deg, rgb(30, 45, 65) 0%, rgb(40, 55, 75) 100%);
    padding: 25px;
    border-radius: 12px;
    border: 3px solid rgb(70, 130, 180);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s;
}

.method-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(100, 149, 237, 0.6);
    border-color: rgb(255, 215, 0);
}

.method-card h4 {
    font-size: 1.6em;
    font-weight: bold;
    color: rgb(255, 215, 0);
    margin-bottom: 15px;
}

.method-card p {
    font-size: 1.05em;
    font-weight: bold;
    color: rgb(240, 248, 255);
    margin-bottom: 10px;
}

/* EXAMPLE BOX */
.example-box {
    background: linear-gradient(135deg, rgb(47, 79, 79) 0%, rgb(60, 90, 90) 100%);
    padding: 25px;
    border-radius: 12px;
    border-left: 8px solid rgb(255, 215, 0);
    margin-top: 25px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.example-box h4 {
    font-size: 1.7em;
    font-weight: bold;
    color: rgb(255, 215, 0);
    margin-bottom: 15px;
}

.example-box p {
    font-size: 1.1em;
    font-weight: bold;
    color: rgb(255, 255, 255);
    margin-bottom: 10px;
}

/* DIFFICULTY BADGES */
.difficulty-badge {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1.15em;
    font-weight: bold;
    border-radius: 30px;
    margin: 25px 0 18px 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.difficulty-badge.easy {
    background: linear-gradient(135deg, rgb(76, 175, 80) 0%, rgb(129, 199, 132) 100%);
    color: rgb(255, 255, 255);
    border: 4px solid rgb(27, 94, 32);
}

.difficulty-badge.medium {
    background: linear-gradient(135deg, rgb(255, 152, 0) 0%, rgb(255, 193, 7) 100%);
    color: rgb(255, 255, 255);
    border: 4px solid rgb(230, 81, 0);
}

.difficulty-badge.hard {
    background: linear-gradient(135deg, rgb(244, 67, 54) 0%, rgb(229, 57, 53) 100%);
    color: rgb(255, 255, 255);
    border: 4px solid rgb(183, 28, 28);
}

/* PROBLEM BOXES */
.problem-box {
    background: linear-gradient(135deg, rgb(28, 35, 50) 0%, rgb(38, 45, 60) 100%);
    padding: 35px;
    border-radius: 15px;
    border: 4px solid rgb(100, 149, 237);
    margin: 30px 0;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6);
}

.problem-box h3 {
    font-size: 2em;
    font-weight: bold;
    color: rgb(135, 206, 250);
    margin-bottom: 25px;
}

.problem-box p {
    font-size: 1.2em;
    font-weight: bold;
    color: rgb(255, 255, 255);
    margin-bottom: 18px;
}

.problem-box strong {
    color: rgb(255, 215, 0);
}

.problem-box ul {
    margin-left: 40px;
    margin-bottom: 20px;
}

.problem-box ul li {
    font-size: 1.15em;
    font-weight: bold;
    color: rgb(240, 248, 255);
    margin-bottom: 12px;
}

/* SOLUTION BOXES */
.solution-box {
    background: linear-gradient(135deg, rgb(20, 25, 40) 0%, rgb(30, 35, 50) 100%);
    padding: 30px;
    border-radius: 12px;
    border-left: 8px solid rgb(50, 205, 50);
    margin-top: 25px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
}

.solution-box h4 {
    font-size: 1.8em;
    font-weight: bold;
    color: rgb(144, 238, 144);
    margin-bottom: 20px;
}

.solution-box p {
    font-size: 1.15em;
    font-weight: bold;
    color: rgb(240, 248, 255);
    margin-bottom: 15px;
}

/* FORMULA HIGHLIGHT */
.formula-highlight {
    background: linear-gradient(135deg, rgb(25, 42, 86) 0%, rgb(38, 70, 83) 100%);
    padding: 20px;
    border-radius: 10px;
    border: 3px solid rgb(255, 215, 0);
    margin-top: 20px;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.formula-highlight p {
    font-size: 1.2em;
    font-weight: bold;
    color: rgb(255, 255, 255);
    margin-bottom: 10px;
}

.answer {
    color: rgb(255, 215, 0);
    font-size: 1.3em;
    background: rgba(255, 215, 0, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
}

/* TABLES */
.calculation-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: rgb(20, 25, 40);
    border: 4px solid rgb(70, 130, 180);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.calculation-table thead {
    background: linear-gradient(135deg, rgb(31, 58, 147) 0%, rgb(42, 82, 152) 100%);
}

.calculation-table th {
    padding: 18px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2em;
    color: rgb(255, 255, 255);
    border: 3px solid rgb(70, 130, 180);
}

.calculation-table td {
    padding: 15px;
    border: 3px solid rgb(70, 130, 180);
    font-weight: bold;
    font-size: 1.1em;
    color: rgb(240, 248, 255);
    text-align: center;
}

.calculation-table tbody tr:nth-child(even) {
    background: rgb(35, 40, 55);
}

.calculation-table tbody tr:nth-child(odd) {
    background: rgb(28, 33, 48);
}

.total-row {
    background: linear-gradient(135deg, rgb(25, 42, 86) 0%, rgb(38, 70, 83) 100%) !important;
}

.total-row td {
    font-size: 1.25em;
    color: rgb(255, 215, 0) !important;
    font-weight: bold;
}

/* FLOWCHART */
.flowchart-container {
    background: linear-gradient(135deg, rgb(245, 245, 250) 0%, rgb(230, 230, 245) 100%);
    padding: 40px;
    border-radius: 18px;
    border: 5px solid rgb(100, 149, 237);
    overflow-x: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
    margin-top: 30px;
}

.flow-start, .flow-end {
    fill: rgb(76, 175, 80);
    stroke: rgb(27, 94, 32);
    stroke-width: 4;
}

.flow-process {
    fill: rgb(30, 144, 255);
    stroke: rgb(0, 105, 217);
    stroke-width: 4;
}

.flow-decision {
    fill: rgb(255, 152, 0);
    stroke: rgb(230, 81, 0);
    stroke-width: 4;
}

.flow-arrow {
    stroke: rgb(0, 0, 0);
    stroke-width: 4;
    fill: none;
}

.arrowhead {
    fill: rgb(0, 0, 0);
}

.flow-text {
    font-size: 18px;
    font-weight: bold;
    fill: rgb(255, 255, 255);
}

/* FOOTER */
footer {
    background: linear-gradient(135deg, rgb(31, 58, 147) 0%, rgb(42, 82, 152) 100%);
    padding: 40px;
    border-radius: 18px;
    border: 5px solid rgb(100, 149, 237);
    margin-top: 50px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
}

.disclaimer {
    text-align: center;
}

.disclaimer p {
    font-size: 1.2em;
    font-weight: bold;
    color: rgb(255, 255, 255);
    margin-bottom: 20px;
    line-height: 2;
}

/* PRINT STYLES */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .print-btn, .topic-nav {
        display: none;
    }
    
    .topic-section {
        page-break-inside: avoid;
        border: 3px solid black;
        background: white;
    }
    
    .difficulty-badge {
        border: 3px solid black;
        color: black !important;
        background: white !important;
    }
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5em;
    }
    
    header h2 {
        font-size: 1.8em;
    }
    
    .nav-buttons {
        grid-template-columns: 1fr;
    }
    
    .method-grid {
        grid-template-columns: 1fr;
    }
}

/* SMOOTH SCROLLING */
html {
    scroll-behavior: smooth;
}