/* General Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    padding: 20px;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border: 3px solid #4a5568;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #0f2027 0%, #207f43 50%, #2c5364 100%);
    color: white;
    padding: 40px;
    text-align: center;
    border-bottom: 6px solid #00d4ff;
    position: relative;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 3em;
    margin-bottom: 15px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #00ff4d, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #00d4ff, 0 0 20px #00d4ff, 0 0 30px #00d4ff;
    }
    to {
        text-shadow: 0 0 20px #00ff88, 0 0 30px #00ff88, 0 0 40px #00ff88;
    }
}

header h2 {
    font-size: 1.5em;
    color: #ffd700;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    animation: fadeIn 2s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.print-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 17px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.print-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.5);
}

/* Content Section Styles */
.content-section {
    padding: 30px;
    margin: 20px;
    border: 3px solid #e2e8f0;
    border-radius: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.content-section h3 {
    color: #ffffff;
    font-size: 2em;
    margin-bottom: 25px;
    padding: 15px 25px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    border: none;
}

/* Definition Box */
.definition-box {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    border-left: 6px solid #0ea5e9;
    padding: 25px;
    margin: 15px 0;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(14, 165, 233, 0.2);
}

.definition-box h4 {
    color: #0c4a6e;
    margin-bottom: 12px;
    font-size: 1.4em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.definition-box p {
    font-size: 1.05em;
    line-height: 1.7;
}

.definition-box ul {
    margin-left: 20px;
    margin-top: 10px;
}

.definition-box li {
    margin: 8px 0;
}

/* Main Points List */
.main-points {
    list-style: none;
    padding: 0;
}

.main-points li {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    margin: 15px 0;
    padding: 18px;
    border-left: 5px solid #10b981;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-points li:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.main-points li strong {
    color: #065f46;
    font-size: 1.1em;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.benefit-card {
    background: linear-gradient(135deg, #ffffff 0%, #dbeafe 100%);
    border: 3px solid #3b82f6;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.benefit-card h4 {
    color: #ffffff;
    font-size: 1.4em;
    margin-bottom: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 8px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    border: none;
}

.benefit-card ul {
    list-style: none;
}

.benefit-card li {
    margin: 10px 0;
    padding-left: 25px;
    position: relative;
}

.benefit-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: bold;
    font-size: 1.2em;
}

/* Flowchart Styles */
.flowchart {
    background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
    border: 4px solid #f59e0b;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.flowchart-title {
    text-align: center;
    font-size: 1.6em;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(234, 88, 12, 0.4);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.activities-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.activity-box {
    border: 4px solid;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.activity-box:hover {
    transform: scale(1.05);
}

.activity-box.operating {
    border-color: #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.activity-box.investing {
    border-color: #f97316;
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
}

.activity-box.financing {
    border-color: #a855f7;
    background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%);
}

.activity-box h4 {
    font-size: 1.4em;
    margin-bottom: 12px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.activity-box.operating h4 {
    color: #065f46;
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.activity-box.investing h4 {
    color: #7c2d12;
    background: linear-gradient(135deg, #f97316, #ea580c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.activity-box.financing h4 {
    color: #581c87;
    background: linear-gradient(135deg, #a855f7, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.activity-box p {
    text-align: center;
    font-style: italic;
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.activity-box ul {
    list-style: none;
    padding: 0;
}

.activity-box li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.activity-box.operating li::before {
    content: "●";
    position: absolute;
    left: 0;
    color: #48bb78;
    font-size: 1.2em;
}

.activity-box.investing li::before {
    content: "●";
    position: absolute;
    left: 0;
    color: #ed8936;
    font-size: 1.2em;
}

.activity-box.financing li::before {
    content: "●";
    position: absolute;
    left: 0;
    color: #9f7aea;
    font-size: 1.2em;
}

/* Steps Container */
.steps-container {
    margin-top: 20px;
}

.step {
    display: flex;
    align-items: flex-start;
    background: white;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.step:hover {
    border-color: #4299e1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.step-number {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7em;
    font-weight: bold;
    margin-right: 20px;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.step-content h4 {
    color: #2c5282;
    font-size: 1.2em;
    margin-bottom: 8px;
}

.step-content p {
    color: #4a5568;
    line-height: 1.6;
}

/* Table Styles */
.adjustment-table,
.data-table,
.solution-table,
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.adjustment-table thead,
.solution-table thead,
.comparison-table thead {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
}

.adjustment-table th,
.adjustment-table td,
.data-table th,
.data-table td,
.solution-table th,
.solution-table td,
.comparison-table th,
.comparison-table td {
    padding: 14px;
    text-align: left;
    border: 1px solid #e2e8f0;
}

.adjustment-table th,
.comparison-table th {
    font-weight: bold;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.adjustment-table td:first-child,
.comparison-table td:first-child {
    font-weight: 500;
}

.positive {
    color: #22543d;
    font-weight: bold;
}

.negative {
    color: #742a2a;
    font-weight: bold;
}

.data-table {
    border: 2px solid #4299e1;
}

.data-table tr:nth-child(even) {
    background: #f7fafc;
}

.data-table td:first-child {
    font-weight: 500;
    color: #2d3748;
}

.data-table td:last-child {
    font-weight: bold;
    color: #2c5282;
    text-align: right;
}

.data-table.small {
    font-size: 0.95em;
}

.solution-table thead th {
    font-size: 1.1em;
    padding: 15px;
    text-align: center;
}

.solution-table tbody tr:first-child td {
    background: #edf2f7;
    font-weight: bold;
    color: #2c5282;
    padding-top: 15px;
}

.solution-table .amount {
    text-align: right;
    font-weight: 600;
}

.solution-table .subtotal-row,
.solution-table .total-row {
    background: #bee3f8;
    font-weight: bold;
}

.solution-table .total-row {
    background: #4299e1;
    color: white;
}

.solution-table .total-row td {
    padding: 15px 12px;
    font-size: 1.1em;
}

/* Example Section */
.example-section {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    border: 4px solid #f97316;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.3);
}

.example-section h3 {
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%) !important;
}

.problem-box {
    background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
    padding: 25px;
    border-radius: 12px;
    border: 3px solid #f59e0b;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.problem-box h4 {
    color: #ffffff;
    font-size: 1.3em;
    margin-bottom: 18px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.problem-box p {
    margin: 10px 0;
}

/* Solution Button */
.solution-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 17px;
    font-weight: bold;
    margin: 15px 0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

.solution-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
}

.solution-btn:active {
    transform: translateY(0);
}

/* Solution Box */
.solution-box {
    display: none;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 4px solid #10b981;
    border-radius: 12px;
    padding: 25px;
    margin-top: 15px;
    animation: slideDown 0.5s ease;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.solution-box.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.solution-box h4 {
    color: #065f46;
    font-size: 1.3em;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Questions Section */
.questions-section {
    background: linear-gradient(135deg, #faf5ff 0%, #e9d5ff 100%);
    border: 4px solid #a855f7;
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.3);
}

.questions-section h3 {
    background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%) !important;
}

.question-card {
    background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
    border: 3px solid #f59e0b;
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.3);
    transition: transform 0.3s ease;
}

.question-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.question-number {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c5282;
}

.marks-badge {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1em;
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.4);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.question-text {
    margin: 15px 0;
    line-height: 1.7;
}

.question-text p {
    margin: 10px 0;
    font-size: 1.05em;
}

/* Key Points Box */
.key-points-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 4px solid #f59e0b;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.key-points-box ul {
    list-style: none;
    padding: 0;
}

.key-points-box li {
    padding: 15px;
    margin: 12px 0;
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
    border-left: 6px solid #f59e0b;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.key-points-box li:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

.key-points-box li strong {
    color: #92400e;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #020617 100%);
    color: white;
    text-align: center;
    padding: 30px;
    border-top: 6px solid #06b6d4;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
}

footer p {
    margin: 8px 0;
    font-size: 1.05em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

footer p:first-child {
    font-weight: bold;
    color: #06b6d4;
    font-size: 1.1em;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        border: 1px solid #000;
    }

    .print-btn {
        display: none;
    }

    .solution-btn {
        display: none;
    }

    .solution-box {
        display: block !important;
        border: 2px solid #000;
        page-break-inside: avoid;
    }

    .content-section {
        page-break-inside: avoid;
    }

    header {
        background: #2d3748;
        color: white;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-width: 2px;
    }

    header h1 {
        font-size: 1.8em;
    }

    header h2 {
        font-size: 1em;
    }

    .print-btn {
        position: static;
        margin-top: 15px;
        display: block;
        width: 100%;
    }

    .content-section {
        padding: 20px;
        margin: 10px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .activities-container {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
    }

    .step-number {
        margin-bottom: 15px;
    }

    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    table {
        font-size: 0.9em;
    }
}