/* ============================================
   ACCOUNTS FROM INCOMPLETE RECORDS
   Professional CSS Stylesheet
   Class XI - WBCHSE
   ============================================ */

/* CSS Variables for Theme */
:root {
    --primary-bg: rgb(15, 23, 42);
    --secondary-bg: rgb(30, 41, 59);
    --card-bg: rgb(51, 65, 85);
    --accent-color: rgb(56, 189, 248);
    --accent-secondary: rgb(34, 197, 94);
    --accent-warning: rgb(251, 191, 36);
    --accent-danger: rgb(239, 68, 68);
    --text-primary: rgb(248, 250, 252);
    --text-secondary: rgb(203, 213, 225);
    --border-color: rgb(71, 85, 105);
    --border-accent: rgb(56, 189, 248);
    --gradient-start: rgb(15, 23, 42);
    --gradient-end: rgb(30, 58, 95);
    --table-header: rgb(30, 58, 95);
    --table-row-alt: rgb(39, 52, 73);
    --success-bg: rgb(22, 78, 51);
    --formula-bg: rgb(55, 48, 82);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    font-weight: 600;
}

/* Header Styles */
.main-header {
    background: linear-gradient(90deg, rgb(15, 23, 42), rgb(30, 58, 95));
    padding: 1.5rem 2rem;
    border-bottom: 3px solid var(--accent-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.emblem {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.title-group h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 1rem;
    color: var(--accent-color);
    font-weight: 700;
    letter-spacing: 1px;
}

/* Print Button */
.print-btn {
    background: linear-gradient(135deg, var(--accent-color), rgb(14, 165, 233));
    color: rgb(15, 23, 42);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6);
}

/* Navigation Panel */
.navigation-panel {
    background: var(--secondary-bg);
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border-color);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
}

.nav-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.nav-btn {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--accent-color);
    color: var(--primary-bg);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Content Sections */
.content-section {
    background: var(--secondary-bg);
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 2px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.section-header {
    background: linear-gradient(90deg, rgb(30, 58, 95), rgb(51, 85, 125));
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 3px solid var(--accent-color);
}

.section-number {
    background: var(--accent-color);
    color: var(--primary-bg);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 800;
    flex-shrink: 0;
}

.section-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.section-body {
    padding: 1.5rem;
}

/* Cards and Boxes */
.intro-card,
.concept-box,
.problem-box,
.solution-box {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
}

.intro-card h3,
.concept-box h3,
.problem-box h3,
.solution-box h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.intro-card h4,
.problem-box h4,
.solution-box h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-secondary);
    margin: 1.5rem 0 1rem 0;
}

.intro-card p,
.concept-box p,
.problem-box p {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--secondary-bg);
    border-radius: 6px;
    border-left: 4px solid var(--accent-color);
    font-weight: 600;
    color: var(--text-secondary);
}

.feature-list li strong {
    color: var(--accent-color);
}

/* Step List */
.step-list {
    padding-left: 1.5rem;
}

.step-list li {
    padding: 0.5rem 0;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Formula Box */
.formula-box {
    background: var(--formula-bg);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 2px solid rgb(139, 92, 246);
}

.formula-box h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: rgb(167, 139, 250);
    margin-bottom: 1rem;
}

.formula {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-warning);
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
}

/* Tables */
.info-table,
.data-table,
.solution-table,
.calculation-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-weight: 600;
}

.info-table th,
.data-table th,
.solution-table th {
    background: var(--table-header);
    color: var(--text-primary);
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    border: 2px solid var(--border-color);
}

.info-table td,
.data-table td,
.solution-table td,
.calculation-table td {
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
}

.info-table tr:nth-child(even),
.data-table tr:nth-child(even),
.solution-table tr:nth-child(even) {
    background: var(--table-row-alt);
}

.info-table tr:hover,
.data-table tr:hover,
.solution-table tr:hover {
    background: rgba(56, 189, 248, 0.1);
}

.total-row {
    background: var(--table-header) !important;
}

.total-row td {
    font-weight: 700;
    color: var(--accent-color) !important;
}

.result-row {
    background: var(--success-bg) !important;
}

.result-row td {
    font-weight: 700;
    color: var(--accent-secondary) !important;
}

/* Calculation Table */
.calculation-table {
    max-width: 500px;
}

.calculation-table td:first-child {
    width: 70%;
}

.calculation-table td:last-child {
    text-align: right;
}

/* Problem Content */
.problem-content {
    background: var(--secondary-bg);
    border-radius: 8px;
    padding: 1rem;
}

.problem-content ul {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.problem-content ul li {
    padding: 0.3rem 0;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Result Highlight */
.result-highlight {
    background: var(--success-bg);
    color: var(--accent-secondary);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-weight: 700;
    border-left: 4px solid var(--accent-secondary);
}

/* Section Divider */
.section-divider {
    background: var(--table-header) !important;
}

.section-divider td {
    text-align: center;
    color: var(--accent-warning) !important;
    font-weight: 700;
    padding: 0.5rem !important;
}

/* Flowchart Styles */
.flowchart-container,
.mindmap-container {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    overflow-x: auto;
}

.flowchart-svg,
.mindmap-svg {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: block;
}

/* Flowchart Elements */
.flow-start {
    fill: var(--accent-secondary);
    stroke: rgb(22, 163, 74);
    stroke-width: 3;
}

.flow-end {
    fill: var(--accent-danger);
    stroke: rgb(220, 38, 38);
    stroke-width: 3;
}

.flow-process {
    fill: rgb(30, 58, 95);
    stroke: var(--accent-color);
    stroke-width: 3;
}

.flow-decision {
    fill: rgb(55, 48, 82);
    stroke: rgb(139, 92, 246);
    stroke-width: 3;
}

.flow-end-process {
    fill: rgb(55, 48, 82);
    stroke: var(--accent-warning);
    stroke-width: 2;
}

.flow-info-box {
    fill: rgba(56, 189, 248, 0.1);
    stroke: var(--accent-color);
    stroke-width: 2;
    stroke-dasharray: 5,5;
}

.flow-arrow {
    stroke: var(--accent-color);
    stroke-width: 3;
}

.flow-arrow-head {
    fill: var(--accent-color);
}

.flow-text {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 14px;
    font-weight: 700;
    fill: var(--text-primary);
    text-anchor: middle;
}

.flow-text-start {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 16px;
    font-weight: 700;
    fill: var(--primary-bg);
    text-anchor: middle;
}

.flow-text-decision {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 12px;
    font-weight: 700;
    fill: var(--text-primary);
    text-anchor: middle;
}

.flow-text-small {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 12px;
    font-weight: 700;
    fill: var(--text-primary);
    text-anchor: middle;
}

.flow-label {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 12px;
    font-weight: 700;
    fill: var(--accent-warning);
}

.flow-info-text {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 12px;
    font-weight: 700;
    fill: var(--accent-color);
    text-anchor: middle;
}

.flow-info-text-small {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 10px;
    font-weight: 600;
    fill: var(--text-secondary);
    text-anchor: middle;
}

/* Mind Map Styles */
.mm-central {
    fill: linear-gradient(135deg, rgb(30, 58, 95), rgb(51, 85, 125));
    fill: rgb(30, 58, 95);
    stroke: var(--accent-color);
    stroke-width: 4;
}

.mm-central-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 18px;
    font-weight: 800;
    fill: var(--text-primary);
    text-anchor: middle;
}

.mm-branch {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
}

.branch-1 { stroke: rgb(239, 68, 68); }
.branch-2 { stroke: rgb(251, 191, 36); }
.branch-3 { stroke: rgb(34, 197, 94); }
.branch-4 { stroke: rgb(56, 189, 248); }
.branch-5 { stroke: rgb(167, 139, 250); }
.branch-6 { stroke: rgb(244, 114, 182); }

.mm-sub-branch {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

.mm-node {
    stroke-width: 3;
}

.node-1 { fill: rgb(127, 29, 29); stroke: rgb(239, 68, 68); }
.node-2 { fill: rgb(113, 63, 18); stroke: rgb(251, 191, 36); }
.node-3 { fill: rgb(20, 83, 45); stroke: rgb(34, 197, 94); }
.node-4 { fill: rgb(12, 74, 110); stroke: rgb(56, 189, 248); }
.node-5 { fill: rgb(76, 29, 149); stroke: rgb(167, 139, 250); }
.node-6 { fill: rgb(131, 24, 67); stroke: rgb(244, 114, 182); }

.mm-node-text {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 14px;
    font-weight: 700;
    fill: var(--text-primary);
    text-anchor: middle;
}

.mm-leaf {
    stroke-width: 2;
}

.leaf-1 { fill: rgb(153, 27, 27); stroke: rgb(248, 113, 113); }
.leaf-2 { fill: rgb(133, 77, 14); stroke: rgb(253, 224, 71); }
.leaf-3 { fill: rgb(22, 101, 52); stroke: rgb(74, 222, 128); }
.leaf-4 { fill: rgb(7, 89, 133); stroke: rgb(125, 211, 252); }
.leaf-5 { fill: rgb(88, 28, 135); stroke: rgb(196, 181, 253); }
.leaf-6 { fill: rgb(157, 23, 77); stroke: rgb(249, 168, 212); }

.mm-leaf-text {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 11px;
    font-weight: 700;
    fill: var(--text-primary);
    text-anchor: middle;
}

/* Roadmap Styles */
.roadmap-container {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    border: 2px solid var(--border-color);
}

.roadmap-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.roadmap-phase {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.phase-marker {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), rgb(14, 165, 233));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
    border: 3px solid var(--text-primary);
}

.phase-marker.final {
    background: linear-gradient(135deg, var(--accent-secondary), rgb(22, 163, 74));
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.phase-number {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-bg);
}

.phase-content {
    flex: 1;
    background: var(--secondary-bg);
    border-radius: 10px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
}

.phase-content h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.phase-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.phase-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem;
    background: var(--card-bg);
    border-radius: 6px;
}

.item-icon {
    font-size: 1.2rem;
}

.item-text {
    font-weight: 600;
    color: var(--text-secondary);
}

.roadmap-connector {
    width: 4px;
    height: 30px;
    background: var(--accent-color);
    margin-left: 28px;
    border-radius: 2px;
}

.final-phase .roadmap-connector {
    display: none;
}

/* Formula Cards */
.formula-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.formula-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.formula-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.2);
}

.formula-card h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
}

.formula-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-warning);
    background: var(--secondary-bg);
    padding: 0.8rem;
    border-radius: 6px;
}

/* Footer Styles */
.main-footer {
    background: var(--primary-bg);
    padding: 2rem;
    border-top: 3px solid var(--accent-color);
    margin-top: 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.disclaimer {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid var(--accent-danger);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.disclaimer p {
    font-weight: 600;
    color: var(--text-secondary);
}

.disclaimer strong {
    color: var(--accent-danger);
}

.footer-info {
    text-align: center;
}

.footer-info p {
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0.3rem 0;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), rgb(14, 165, 233));
    color: var(--primary-bg);
    border: none;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6);
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .main-header,
    .navigation-panel,
    .print-btn,
    .back-to-top {
        display: none !important;
    }
    
    .content-section {
        background: white;
        border: 1px solid #333;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .section-header {
        background: #f0f0f0;
        color: black;
        border-bottom: 2px solid #333;
    }
    
    .section-number {
        background: #333;
        color: white;
    }
    
    .section-header h2 {
        color: black;
    }
    
    .intro-card,
    .concept-box,
    .problem-box,
    .solution-box {
        background: #f9f9f9;
        border: 1px solid #333;
    }
    
    .intro-card h3,
    .concept-box h3,
    .problem-box h3,
    .solution-box h3 {
        color: #333;
    }
    
    .formula-box {
        background: #f0f0f0;
        border: 1px solid #666;
    }
    
    .formula {
        background: #e0e0e0;
        color: #333;
    }
    
    table {
        border: 1px solid #333;
    }
    
    th {
        background: #e0e0e0 !important;
        color: black !important;
    }
    
    td {
        color: black !important;
    }
    
    .flowchart-svg,
    .mindmap-svg {
        max-width: 100%;
    }
    
    .main-footer {
        background: white;
        border-top: 2px solid #333;
    }
    
    .disclaimer {
        background: #fff5f5;
        border: 1px solid #cc0000;
    }
    
    .disclaimer strong {
        color: #cc0000;
    }
}

/* Responsive Styles */
@media screen and (max-width: 1024px) {
    .main-content {
        padding: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .formula-cards {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-section {
        flex-direction: column;
    }
    
    .title-group h1 {
        font-size: 1.5rem;
    }
    
    .nav-buttons {
        justify-content: center;
    }
    
    .nav-btn {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .section-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .solution-table {
        font-size: 0.85rem;
    }
    
    .solution-table th,
    .solution-table td {
        padding: 0.5rem;
    }
    
    .roadmap-phase {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .roadmap-connector {
        margin: 0 auto;
    }
    
    .flowchart-container,
    .mindmap-container {
        padding: 0.5rem;
    }
}

@media screen and (max-width: 480px) {
    .main-header {
        padding: 1rem;
    }
    
    .title-group h1 {
        font-size: 1.2rem;
    }
    
    .section-body {
        padding: 1rem;
    }
    
    .intro-card,
    .concept-box,
    .problem-box,
    .solution-box {
        padding: 1rem;
    }
    
    .data-table,
    .solution-table {
        font-size: 0.75rem;
    }
    
    .phase-marker {
        width: 50px;
        height: 50px;
    }
    
    .phase-number {
        font-size: 1.2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section {
    animation: fadeIn 0.5s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(14, 165, 233);
}

/* Selection Styling */
::selection {
    background: var(--accent-color);
    color: var(--primary-bg);
}