* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d0000 100%);
    padding: 40px 20px;
    min-height: 100vh;
    position: relative;
}

.background-logo {
    position: fixed;
    top: 25px;
    left: 20px;
    width: 200px;
    height: 200px;
    opacity: 1;
    z-index: 1;
    pointer-events: none;
}

.background-logo-bottom-right {
    position: fixed;
    bottom: 50px;
    right: 20px;
    width: 300px;
    height: auto;
    opacity: 1;
    z-index: 1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #1f1f1f;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

@media print {
    body {
        background: #1f1f1f;
    }
    .container {
        box-shadow: none;
        max-width: 100%;
        padding: 20px;
    }
    .term-grid {
        page-break-inside: avoid;
    }
    .step {
        page-break-inside: avoid;
    }
    h2 {
        page-break-after: avoid;
    }
}

h1 {
    text-align: center;
    color: #ffffff;
    font-size: 1.9em;
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: #9ca3af;
    margin-bottom: 20px;
    font-size: 0.95em;
}

h2 {
    color: #dc2626;
    font-size: 1.4em;
    margin: 20px 0 15px 0;
    padding-bottom: 6px;
    border-bottom: 3px solid #dc2626;
}

h2:nth-of-type(2) {
    page-break-before: always;
    margin-top: 0;
}

.term-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.term-card {
    background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #dc2626;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Added for better content flow */
    flex-direction: column; /* Added for better content flow */
}

.term-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
}

.term-name {
    font-weight: 700;
    color: #f5f5f5;
    font-size: 1.05em;
    margin-bottom: 8px;
}

.term-definition {
    color: #d1d5db;
    line-height: 1.5;
    font-size: 0.85em;
    flex-grow: 1; /* Makes definition take up space */
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.step {
    background: linear-gradient(135deg, #1a1a1a 0%, #dc2626 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    position: relative;
    padding-left: 75px;
}

.step-number {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: white;
    color: #dc2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2em;
}

.step-title {
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.step-content {
    line-height: 1.6;
    opacity: 0.95;
    font-size: 0.95em;
}

.step-content ul {
    margin-top: 10px;
    list-style: none;
}

.step-content li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

.step-content li:before {
    content: "→";
    position: absolute;
    left: 0;
    font-weight: 700;
}

.key-clarifications {
    background: #1a1a1a;
    border: 2px solid #dc2626;
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
}

.key-clarifications h3 {
    color: #dc2626;
    margin-bottom: 12px;
    font-size: 1.2em;
}

.key-clarifications ul {
    list-style: none;
}

.key-clarifications li {
    color: #f5f5f5;
    padding: 6px 0;
    padding-left: 25px;
    position: relative;
    line-height: 1.5;
    font-size: 0.95em;
}

.key-clarifications li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #dc2626;
    font-weight: 700;
}

/* --- VISUALS CSS --- */
.term-visual {
    background: #2a2a2a; /* A slightly different dark bg */
    border-radius: 6px;
    margin-top: 15px;
    padding: 5px;
    border: 1px solid #4b5563; /* Faint border */
}

.step-visual {
    background: rgba(0,0,0,0.2); /* Darker, slightly transparent bg */
    border-radius: 8px;
    margin-top: 15px;
    padding: 10px;
    border: 1px solid #4b5563; /* Faint border */
    min-height: 100px;
}

/* Candle Colors */
.bull-candle { fill: #22c55e; } /* Green */
.bear-candle { fill: #ef4444; } /* Red */
.wick { stroke: #9ca3af; stroke-width: 1; }

/* Text & Lines */
.label {
    font-size: 6px; /* Corrected font size */
    fill: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
}
/* Labels for process steps */
.process-label {
    font-size: 8px; /* Corrected font size */
    fill: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
}
.process-label-light {
    font-size: 7px; /* Corrected font size */
    fill: #d1d5db;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.label-line {
    stroke: #f5f5f5;
    stroke-width: 0.5;
}
.level-line {
    stroke: #f5f5f5;
    stroke-width: 0.75;
    stroke-dasharray: 3 3;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .term-grid {
        grid-template-columns: 1fr;
    }
    
    .step {
        padding-left: 25px;
        padding-top: 70px;
    }
    
    .step-number {
        left: 50%;
        transform: translateX(-50%);
        top: 20px;
    }
}

