/* 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, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

/* Header */
.header {
    background: linear-gradient(135deg, rgb(31, 224, 199) 0%, rgb(208, 31, 224) 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    border: 5px solid rgb(208, 31, 224);
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(208, 31, 224, 0.3);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.95;
}

/* Table of Contents */
.toc {
    background-color: #f8f9fa;
    padding: 25px;
    border-left: 5px solid rgb(31, 224, 199);
    border-right: 5px solid rgb(208, 31, 224);
    margin-bottom: 30px;
    border-radius: 10px;
}

.toc h2 {
    color: rgb(208, 31, 224);
    margin-bottom: 15px;
    font-size: 1.8em;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin: 10px 0;
    padding-left: 25px;
    position: relative;
}

.toc li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: rgb(31, 224, 199);
    font-size: 0.8em;
}

.toc a {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.toc a:hover {
    color: rgb(208, 31, 224);
    padding-left: 10px;
}

/* Content Sections */
.content-section {
    margin-bottom: 50px;
    padding: 30px;
    background-color: white;
    border: 3px solid rgb(31, 224, 199);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(31, 224, 199, 0.1);
}

.content-section h2 {
    color: rgb(208, 31, 224);
    font-size: 2em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid rgb(31, 224, 199);
}

.content-section h3 {
    color: rgb(31, 224, 199);
    font-size: 1.5em;
    margin: 25px 0 15px 0;
}

.content-section h4 {
    color: rgb(208, 31, 224);
    font-size: 1.2em;
    margin: 15px 0 10px 0;
}

.content-section p {
    margin-bottom: 15px;
    text-align: justify;
    font-size: 1.05em;
}

.content-section ul {
    margin-left: 25px;
    margin-bottom: 20px;
}

.content-section li {
    margin: 10px 0;
    line-height: 1.8;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, rgba(31, 224, 199, 0.1) 0%, rgba(208, 31, 224, 0.1) 100%);
    padding: 20px;
    border-left: 5px solid rgb(31, 224, 199);
    border-radius: 8px;
    margin: 20px 0;
}

.highlight-box h3 {
    margin-top: 0;
}

/* Analogy Box */
.analogy-box {
    background-color: #fff3cd;
    padding: 20px;
    border: 3px solid rgb(208, 31, 224);
    border-radius: 10px;
    margin: 20px 0;
}

.analogy-box h3 {
    color: rgb(208, 31, 224);
    margin-top: 0;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, rgba(208, 31, 224, 0.1) 0%, rgba(31, 224, 199, 0.1) 100%);
    padding: 20px;
    border: 2px dashed rgb(31, 224, 199);
    border-radius: 8px;
    margin: 20px 0;
}

.info-box h3 {
    color: rgb(208, 31, 224);
    margin-top: 0;
}

/* Flowchart */
.flowchart {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin: 20px 0;
}

.flow-step {
    display: flex;
    align-items: center;
    background: white;
    border: 3px solid rgb(31, 224, 199);
    border-radius: 10px;
    padding: 20px;
    margin: 10px 0;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 3px 10px rgba(31, 224, 199, 0.2);
    transition: transform 0.3s ease;
}

.flow-step:hover {
    transform: translateX(10px);
    border-color: rgb(208, 31, 224);
}

.step-number {
    background: linear-gradient(135deg, rgb(31, 224, 199) 0%, rgb(208, 31, 224) 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    margin-right: 20px;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 5px 0;
    color: rgb(208, 31, 224);
}

.step-content p {
    margin: 0;
    color: #666;
}

.flow-arrow {
    font-size: 2em;
    color: rgb(31, 224, 199);
    margin: 5px 0;
}

/* Decision Flowchart */
.decision-flowchart {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin: 20px 0;
}

.decision-node {
    background: white;
    border: 3px solid rgb(208, 31, 224);
    border-radius: 15px;
    padding: 20px 30px;
    margin: 10px 0;
    font-weight: bold;
    color: rgb(208, 31, 224);
    text-align: center;
    min-width: 200px;
    box-shadow: 0 3px 10px rgba(208, 31, 224, 0.2);
}

.start-node {
    background: linear-gradient(135deg, rgb(31, 224, 199) 0%, rgb(208, 31, 224) 100%);
    color: white;
    border-color: rgb(31, 224, 199);
}

.branch-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 900px;
    margin: 20px 0;
}

.branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    margin: 0 10px;
}

.branch-label {
    background-color: rgb(31, 224, 199);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    margin-bottom: 10px;
    font-size: 0.9em;
    font-weight: bold;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 25px 0;
    border: 3px solid rgb(31, 224, 199);
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

thead {
    background: linear-gradient(135deg, rgb(31, 224, 199) 0%, rgb(208, 31, 224) 100%);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
    border-bottom: 3px solid rgb(208, 31, 224);
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

tbody tr {
    transition: background-color 0.3s ease;
}

tbody tr:hover {
    background-color: rgba(31, 224, 199, 0.1);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Pricing Table Specific */
.pricing-table td:nth-child(2),
.pricing-table td:nth-child(3) {
    font-weight: bold;
    color: rgb(208, 31, 224);
}

/* Factors Grid */
.factors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.factor-card {
    background: white;
    border: 3px solid rgb(31, 224, 199);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(31, 224, 199, 0.1);
}

.factor-card:hover {
    transform: translateY(-5px);
    border-color: rgb(208, 31, 224);
    box-shadow: 0 8px 20px rgba(208, 31, 224, 0.3);
}

.factor-card h4 {
    color: rgb(208, 31, 224);
    margin-top: 0;
    margin-bottom: 10px;
}

/* Terms Container */
.terms-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.term-item {
    background: linear-gradient(135deg, rgba(31, 224, 199, 0.05) 0%, rgba(208, 31, 224, 0.05) 100%);
    padding: 20px;
    border-left: 5px solid rgb(31, 224, 199);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.term-item:hover {
    border-left-color: rgb(208, 31, 224);
    transform: translateX(10px);
}

.term-item h3 {
    margin-top: 0;
    color: rgb(208, 31, 224);
}

/* Q&A Section */
.qa-instruction {
    text-align: center;
    font-style: italic;
    color: rgb(208, 31, 224);
    margin-bottom: 20px;
    font-size: 1.1em;
}

.qa-container {
    margin: 25px 0;
}

.qa-item {
    margin-bottom: 15px;
    border: 2px solid rgb(31, 224, 199);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.qa-item:hover {
    border-color: rgb(208, 31, 224);
    box-shadow: 0 5px 15px rgba(208, 31, 224, 0.2);
}

.qa-question {
    width: 100%;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgb(31, 224, 199) 0%, rgb(208, 31, 224) 100%);
    color: white;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.qa-question:hover {
    opacity: 0.9;
}

.toggle-icon {
    font-size: 1.5em;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.qa-question.active .toggle-icon {
    transform: rotate(45deg);
}

.qa-answer {
    max-height: 0;
    overflow: hidden;
    background-color: white;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.qa-answer.active {
    max-height: 500px;
    padding: 20px;
    border-top: 2px solid rgb(31, 224, 199);
}

.qa-answer p {
    margin: 0;
    line-height: 1.8;
    color: #333;
}

.qa-answer strong {
    color: rgb(208, 31, 224);
}

/* Conclusion */
.conclusion {
    background: linear-gradient(135deg, rgba(31, 224, 199, 0.1) 0%, rgba(208, 31, 224, 0.1) 100%);
    border: 3px solid rgb(208, 31, 224);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, rgb(208, 31, 224) 0%, rgb(31, 224, 199) 100%);
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 30px;
    border-radius: 10px;
    border: 5px solid rgb(31, 224, 199);
}

.footer p {
    margin: 10px 0;
    font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .content-section h2 {
        font-size: 1.5em;
    }
    
    .factors-grid {
        grid-template-columns: 1fr;
    }
    
    .terms-container {
        grid-template-columns: 1fr;
    }
    
    .branch-container {
        flex-direction: column;
    }
    
    .branch {
        margin: 10px 0;
    }
    
    .flow-step {
        max-width: 100%;
    }
    
    table {
        font-size: 0.9em;
    }
    
    th, td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5em;
    }
    
    .qa-question {
        font-size: 1em;
        padding: 15px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
        margin-right: 15px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background-color: rgb(31, 224, 199);
    color: white;
}

::-moz-selection {
    background-color: rgb(31, 224, 199);
    color: white;
}