/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, rgb(101, 201, 100) 0%, rgb(80, 180, 80) 100%);
    color: #1a1a1a;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.95);
    border: 5px solid rgb(100, 230, 168);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, rgb(100, 230, 168) 0%, rgb(80, 210, 148) 100%);
    padding: 30px;
    text-align: center;
    border-bottom: 3px solid rgb(101, 201, 100);
}

header h1 {
    color: #003d00;
    font-size: 2.5em;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

header h2 {
    color: #004d00;
    font-size: 1.5em;
    font-weight: 800;
    margin-bottom: 15px;
}

header p {
    color: #005500;
    font-size: 1.1em;
    font-weight: 700;
    margin: 5px 0;
}

/* Navigation Menu */
.nav-menu {
    background-color: rgb(101, 201, 100);
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    border-bottom: 3px solid rgb(100, 230, 168);
}

.nav-menu button {
    background-color: rgb(100, 230, 168);
    color: #003d00;
    border: 2px solid #003d00;
    padding: 12px 20px;
    font-size: 1em;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-menu button:hover {
    background-color: #003d00;
    color: rgb(100, 230, 168);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.print-btn {
    background-color: #ff6b35 !important;
    color: white !important;
    border: 2px solid #cc5529 !important;
}

.print-btn:hover {
    background-color: #cc5529 !important;
    color: white !important;
}

/* Section Styles */
.section {
    padding: 40px;
    border-bottom: 3px solid rgb(100, 230, 168);
}

.section:last-of-type {
    border-bottom: none;
}

.section h2 {
    color: #003d00;
    font-size: 2em;
    font-weight: 900;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid rgb(100, 230, 168);
}

.section h3 {
    color: #004d00;
    font-size: 1.5em;
    font-weight: 800;
    margin: 25px 0 15px 0;
}

.section h4 {
    color: #005500;
    font-size: 1.2em;
    font-weight: 800;
    margin: 20px 0 10px 0;
}

.section p, .section li {
    font-weight: 700;
    color: #1a1a1a;
    margin: 8px 0;
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.summary-card {
    background: linear-gradient(135deg, rgb(240, 255, 245) 0%, rgb(230, 250, 235) 100%);
    border: 3px solid rgb(100, 230, 168);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-card h3 {
    color: #003d00;
    font-weight: 900;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.4em;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    border: 2px solid rgb(100, 230, 168);
    border-radius: 8px;
    overflow: hidden;
}

table thead {
    background-color: rgb(101, 201, 100);
    color: #003d00;
}

table th {
    padding: 15px;
    text-align: left;
    font-weight: 900;
    font-size: 1em;
    border-bottom: 2px solid rgb(100, 230, 168);
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 700;
}

table tbody tr:hover {
    background-color: rgb(240, 255, 245);
}

.amount {
    text-align: right;
    font-weight: 900;
    font-size: 1.1em;
}

.positive {
    color: #006600;
    font-weight: 900;
}

.negative {
    color: #cc0000;
    font-weight: 900;
}

.total-row {
    background-color: rgb(230, 250, 235);
    font-weight: 900;
}

.total-row td {
    border-top: 3px solid rgb(100, 230, 168);
    padding: 15px;
    font-size: 1.1em;
}

.transaction-table {
    font-size: 0.95em;
}

.info-text {
    text-align: center;
    font-style: italic;
    padding: 30px;
    color: #005500;
}

/* Broker Section */
.broker-section {
    background-color: rgb(245, 255, 248);
    border: 2px solid rgb(100, 230, 168);
    border-radius: 10px;
    padding: 25px;
    margin: 20px 0;
}

/* Calculation Format */
.calculation-format {
    background-color: rgb(255, 250, 230);
    border: 3px solid rgb(255, 200, 100);
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
}

.calculation-format h4 {
    color: #664400;
    font-weight: 900;
    margin-bottom: 15px;
}

.calculation-format p {
    color: #1a1a1a;
    font-weight: 700;
    margin: 8px 0;
    line-height: 1.8;
}

.calculation-format ul {
    margin-left: 25px;
}

.calculation-format li {
    color: #1a1a1a;
    font-weight: 700;
    margin: 5px 0;
}

/* Info Box */
.info-box {
    background-color: rgb(230, 245, 255);
    border: 3px solid rgb(100, 180, 230);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    font-weight: 700;
    color: #003366;
}

.info-box h4 {
    color: #003366;
    font-weight: 900;
    margin-bottom: 10px;
}

.info-box p, .info-box li {
    color: #003366;
    font-weight: 700;
}

.info-box ul {
    margin-left: 25px;
    margin-top: 10px;
}

.info-box table {
    margin: 15px 0;
}

.info-box table th {
    background-color: rgb(180, 220, 255);
    color: #003366;
}

/* Total Summary */
.total-summary {
    background: linear-gradient(135deg, rgb(100, 230, 168) 0%, rgb(80, 210, 148) 100%);
    border: 3px solid rgb(101, 201, 100);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
}

.total-summary h3 {
    color: #003d00;
    font-weight: 900;
    margin-bottom: 15px;
    text-align: center;
}

.total-summary table {
    background-color: white;
}

/* Solution Button and Box */
.solution-btn {
    background-color: rgb(100, 230, 168);
    color: #003d00;
    border: 3px solid #003d00;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 900;
    border-radius: 10px;
    cursor: pointer;
    margin: 25px 0;
    display: block;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

.solution-btn:hover {
    background-color: #003d00;
    color: rgb(100, 230, 168);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.solution-box {
    background-color: rgb(255, 250, 240);
    border: 3px solid rgb(255, 180, 100);
    border-radius: 10px;
    padding: 25px;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.solution-box.hidden {
    display: none;
}

.solution-box h4 {
    color: #664400;
    font-weight: 900;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.solution-box p {
    color: #1a1a1a;
    font-weight: 700;
    margin: 10px 0;
}

.solution-box ul {
    margin-left: 25px;
    margin-top: 10px;
}

.solution-box li {
    color: #1a1a1a;
    font-weight: 700;
    margin: 8px 0;
}

.solution-box table {
    margin: 15px 0;
}

/* Calculator Styles */
.calculator {
    background: linear-gradient(135deg, rgb(240, 250, 255) 0%, rgb(230, 245, 255) 100%);
    border: 3px solid rgb(100, 180, 230);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
}

.calculator h3 {
    color: #003366;
    font-weight: 900;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.4em;
}

.calc-input {
    margin: 15px 0;
}

.calc-input label {
    display: block;
    color: #003366;
    font-weight: 900;
    margin-bottom: 8px;
    font-size: 1.05em;
}

.calc-input input,
.calc-input select {
    width: 100%;
    padding: 12px;
    border: 2px solid rgb(100, 180, 230);
    border-radius: 8px;
    font-size: 1em;
    font-weight: 700;
    background-color: white;
}

.calc-input input:focus,
.calc-input select:focus {
    outline: none;
    border-color: rgb(50, 140, 200);
    box-shadow: 0 0 8px rgba(50, 140, 200, 0.3);
}

.calc-btn {
    background-color: rgb(100, 180, 230);
    color: #003366;
    border: 3px solid #003366;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 900;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.calc-btn:hover {
    background-color: #003366;
    color: rgb(100, 180, 230);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.calc-result {
    background-color: white;
    border: 3px solid rgb(100, 230, 168);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    min-height: 50px;
}

.calc-result h4 {
    color: #003d00;
    font-weight: 900;
    margin-bottom: 10px;
}

.calc-result p {
    color: #1a1a1a;
    font-weight: 700;
    margin: 8px 0;
    line-height: 1.8;
}

.calc-result strong {
    font-weight: 900;
    color: #003d00;
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, rgb(101, 201, 100) 0%, rgb(80, 180, 80) 100%);
    padding: 40px;
    border-top: 3px solid rgb(100, 230, 168);
}

.disclaimer {
    background-color: rgb(255, 250, 230);
    border: 3px solid rgb(255, 180, 100);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
}

.disclaimer h3 {
    color: #cc3300;
    font-weight: 900;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.disclaimer p {
    color: #1a1a1a;
    font-weight: 700;
    margin: 10px 0;
}

.disclaimer ul {
    margin-left: 25px;
    margin-top: 15px;
}

.disclaimer li {
    color: #1a1a1a;
    font-weight: 700;
    margin: 8px 0;
}

.footer-links {
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgb(100, 230, 168);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.footer-links h4 {
    color: #003d00;
    font-weight: 900;
    margin-bottom: 15px;
}

.footer-links ul {
    list-style: none;
    margin-left: 0;
}

.footer-links li {
    margin: 10px 0;
}

.footer-links a {
    color: #005500;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #003d00;
    text-decoration: underline;
}

.copyright {
    text-align: center;
    color: #003d00;
    font-weight: 800;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.5);
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        border: none;
        box-shadow: none;
    }

    .nav-menu,
    .solution-btn,
    #calculators {
        display: none;
    }

    .section {
        page-break-inside: avoid;
    }

    table {
        page-break-inside: avoid;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        border-width: 3px;
    }

    header h1 {
        font-size: 1.8em;
    }

    header h2 {
        font-size: 1.2em;
    }

    .section {
        padding: 20px;
    }

    .section h2 {
        font-size: 1.5em;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-menu button {
        width: 100%;
    }

    table {
        font-size: 0.85em;
    }

    table th,
    table td {
        padding: 8px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Style */
::selection {
    background-color: rgb(100, 230, 168);
    color: #003d00;
}

/* Animation for hover effects */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.summary-card:hover {
    animation: pulse 0.5s ease-in-out;
}