
:root {
    --primary-color: #4a90e2; 
    --secondary-color: #333a45; 
    --background-color: #f4f6f8;
    --card-background: #ffffff; 
    --text-color: #333; 
    --light-text-color: #6b778d;
    --border-color: #dfe6e9; 
    --success-color: #27ae60; 
    --danger-color: #c0392b;
    --sim-active-color: #f39c12; 
    --itm-color-bg: #e8f8f5; 
    --atm-color-bg: #fef9e7; 
    --otm-color-bg: #fcfcfc;
    --font-family: 'Roboto', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --color-stock: #34495e; 
    --color-call: #27ae60; 
    --color-put: #c0392b; 
    --color-delta: #4a90e2;
    --color-gamma: #9b59b6; 
    --color-vega: #16a085; 
    --color-theta: #e67e22; 
    --color-rho: #e74c3c;
    --color-vol: #f39c12;
}
html, body {
    height: 100%; 
    margin: 0; 
    font-family: var(--font-family);
    background-color: var(--background-color); 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    padding: 5px; 
    box-sizing: border-box;
}
.header {
    width: 100%; 
    max-width: 1800px; 
    margin-bottom: 0.5rem; 
    display: flex;
    justify-content: space-between; 
    align-items: center;
}
.header h1 { 
    color: var(--secondary-color); 
    margin: 0; 
    font-size: 1.8rem; 
}
.header-button {
    background-color: var(--primary-color); 
    color: white; 
    border: none; 
    padding: 10px 18px;
    border-radius: 8px; 
    font-size: 0.9rem; 
    font-weight: 600; 
    cursor: pointer; 
    transition: background-color 0.3s;
}
.header-button:hover { 
    background-color: #357abd; 
}
.app-container {
    display: grid; 
    grid-template-columns: 2.5fr 2.5fr 6fr; 
    gap: 1.4rem;
    width: 100%; 
    max-width: 1800px; 
    height: 100%; 
    max-height: 90vh;
    background-color: var(--card-background); 
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1); 
    padding: 1rem; 
    box-sizing: border-box;
}
.column { 
    display: flex; 
    flex-direction: column; 
    gap: 1.2rem; 
    min-height: 0; 
}
.control-group { 
    margin-bottom: 0.5rem; 
}
.control-group label {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    font-weight: 500; 
    margin-bottom: 0.1rem;
    color: var(--secondary-color); 
    font-size: 0.95rem;
}
.label-with-tooltip { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}
.action-controls { 
    gap: 1.2rem; 
}
.scrollable-content { 
    overflow-y: auto; 
    padding-right: 10px;
    flex-grow: 1;
    min-height: 0;
}
h2 {
    color: var(--secondary-color); 
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem; 
    margin: 0;
    font-size: 1.4rem; 
    flex-shrink: 0; 
    font-weight: 700;
}
.control-group .value-display { 
    font-weight: 500; 
    color: var(--primary-color); 
    background-color: #eaf5fc; 
    padding: 2px 8px; 
    border-radius: 6px; 
}
input[type="range"] { 
    width: 100%; 
    -webkit-appearance: none; 
    height: 8px; 
    background: #dfe6e9; 
    border-radius: 5px; 
    outline: none; 
    margin: 0; 
}
input[type="range"]::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    width: 20px; 
    height: 20px; 
    background: var(--primary-color); 
    cursor: pointer; 
    border-radius: 50%; 
    border: 3px solid var(--card-background); 
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); 
    transition: background-color 0.2s; 
}
input[type="range"]::-webkit-slider-thumb:hover { 
    background-color: #357abd; 
}
input[type="range"]:disabled { 
    opacity: 0.5; 
}
input[type="range"]:disabled::-webkit-slider-thumb { 
    background: #bdc3c7; 
    cursor: not-allowed; 
}
.action-controls { 
    border: 1px solid var(--border-color); 
    padding: 1rem; 
    border-radius: 8px; 
    margin-top: auto; 
    display: flex; 
    flex-direction: column; 
    flex-shrink: 0; 
}
.action-button { 
    flex-grow: 1; 
    padding: 12px 10px; 
    border: none; 
    color: white; 
    font-size: 0.9rem; 
    font-weight: 600; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: all 0.3s; 
    text-align: center; 
}
.buttons-group { 
    display: flex; 
    gap: 1rem; 
}
.reset-button { 
    background-color: var(--secondary-color); 
}
.sim-button { 
    background-color: var(--success-color); 
} 
.sim-button.active { 
    background-color: var(--sim-active-color); 
}
#scenario-select { 
    width: 100%; 
    padding: 8px; 
    border-radius: 6px; 
    border: 1px solid var(--border-color); 
    font-size: 0.9rem; 
}
.tooltip-icon { 
    font-style: normal; 
    font-weight: 700; 
    color: #fff; 
    background-color: var(--primary-color); 
    border-radius: 50%; 
    width: 20px; 
    height: 20px; 
    display: inline-flex; 
    justify-content: center; 
    align-items: center; 
    cursor: help; 
    transition: background-color 0.2s; 
}
.tooltip-icon:hover { 
    background-color: #357abd; 
}
.price-card { 
    padding: 0.75rem; 
    border-radius: 8px; 
    text-align: center; 
    border: 2px solid transparent; 
    transition: all 0.4s; 
}
.price-card.itm { 
    background-color: var(--itm-color-bg); 
    border-color: var(--success-color); 
}
.price-card.atm { 
    background-color: var(--atm-color-bg); 
    border-color: var(--sim-active-color); 
}
.price-card.otm { 
    background-color: var(--otm-color-bg); 
    border-color: #ccc; 
}
.price-card .label { 
    font-size: 0.9rem; 
    font-weight: 600; 
    margin-bottom: 0.25rem; 
}
.price-card .value { 
    font-size: 1.3rem; 
    font-weight: 700; 
    margin-bottom: 0.25rem; 
}
.price-card.call .value { 
    color: var(--success-color); 
} 
.price-card.put .value { 
    color: var(--danger-color); 
}
.price-card .breakdown { 
    font-size: 0.75rem; 
    color: var(--light-text-color); 
    min-height: 2.5em; 
}
.greeks-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 0.75rem; 
}
.greek-card { 
    background-color: #f8f9fa; 
    padding: 0.5rem 1rem; 
    border-radius: 8px; 
    border-left: 5px solid; 
    transition: background-color 0.3s; 
}
.greek-card:hover { 
    cursor: pointer; 
    background-color: #eff3f5; 
}
.greek-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.greek-name { 
    font-size: 1rem; 
    font-weight: 700; 
} 
.greek-value { 
    font-size: 1rem; 
    font-weight: 500; 
}
.greek-description { 
    font-size: 0.75rem; 
    color: var(--light-text-color); 
    margin-top: 0.25rem; 
    clear: both; 
}
#delta-indicator-bar { 
    width: 100%; 
    background-color: #e0e0e0; 
    border-radius: 4px; 
    height: 6px; 
    margin-top: 6px; 
    overflow: hidden; 
}
#delta-indicator-fill { 
    height: 100%; 
    background-color: var(--primary-color); 
    border-radius: 4px; 
    transition: width 0.3s; 
}
#delta-card { border-color: var(--color-delta); } 
#gamma-card { border-color: var(--color-gamma); } 
#vega-card { border-color: var(--color-vega); } 
#theta-card { border-color: var(--color-theta); } 
#rho-card { border-color: var(--color-rho); }
.graph-column { 
    min-height: 0; 
    display: flex; 
    flex-direction: column; 
}
.graph-container { 
    flex-grow: 1; 
    position: relative; 
}
.graph-container canvas { 
    position: absolute; 
    width: 100%; 
    height: 100%; 
}
.chart-tabs { 
    display: flex; 
    gap: 5px; 
    background-color: var(--background-color); 
    padding: 5px; 
    border-radius: 10px; 
    margin-bottom: 1.2rem; 
}
.tab-button { 
    flex: 1; 
    padding: 8px 10px; 
    font-size: 0.9rem; 
    font-weight: 600; 
    border: none; 
    border-radius: 7px; 
    background-color: transparent; 
    color: var(--secondary-color); 
    cursor: pointer; 
    transition: all 0.3s ease; 
}
.tab-button.active { 
    background-color: var(--card-background); 
    color: var(--primary-color); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.08); 
}
#payoff-chart-container { 
    display: none; 
}
.timeline-controls { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 6px; 
    padding: 2px; 
    background-color: #f8f9fa; 
    border-radius: 8px; 
    justify-content: center;
}
.timeline-controls .toggle-button { 
    padding: 3px 9px; 
    font-size: 0.78rem; 
    font-weight: 600; 
    border-radius: 15px; 
    cursor: pointer; 
    transition: all 0.2s ease-in-out; 
    border: 2px solid transparent; 
}
.timeline-controls input[type="checkbox"] { 
    display: none; 
}
.timeline-controls input[type="checkbox"] + .toggle-button { 
    background-color: #fff; 
    border-color: var(--color); 
    color: var(--color); 
}
.timeline-controls input[type="checkbox"]:checked + .toggle-button { 
    background-color: var(--color); 
    border-color: var(--color); 
    color: #fff; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
}
.modal-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.6); 
    z-index: 99; 
    display: none; 
    justify-content: center; 
    align-items: center; 
}
.modal-content { 
    background: var(--card-background); 
    padding: 2rem 2.5rem; 
    border-radius: 12px; 
    max-width: 600px; 
    width: 90%; 
    max-height: 80vh; 
    overflow-y: auto; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); 
}
.modal-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 1rem; 
    margin-bottom: 1rem; 
}
.modal-title { 
    margin: 0; 
    color: var(--secondary-color); 
    font-size: 1.6rem; 
}
.modal-close { 
    font-size: 2rem; 
    font-weight: bold; 
    color: #aaa; 
    cursor: pointer; 
    border: none; 
    background: none; 
}
.modal-body p, .modal-body ul { 
    line-height: 1.6; 
    color: var(--text-color); 
}
.modal-body ul { 
    padding-left: 20px; 
}
.modal-body h3 { 
    color: var(--primary-color); 
    margin-top: 1.5rem; 
    margin-bottom: 0.5rem; 
}
.modal-body .color-box { 
    display: inline-block; 
    width: 14px; 
    height: 14px; 
    border-radius: 3px; 
    margin-right: 8px; 
    vertical-align: middle; 
}
.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.language-switcher {
    display: flex;
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 4px;
}
.lang-btn {
    border: none;
    background-color: transparent;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--light-text-color);
    transition: all 0.3s ease;
}
.lang-btn.active {
    background-color: var(--card-background);
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* --- MOBILE RESPONSIVE STYLES --- */

@media screen and (max-width: 768px) {
    body {
        padding: 0;
        height: auto; /* Umožní obsahu rásť */
    }
    
    .app-container {
        display: flex;
        flex-wrap: wrap;
        height: auto;
        max-height: none;
        padding: 0.8rem;
        gap: 1rem;
        border-radius: 0;
    }

    .column {
        min-width: 0;
    }

    .column:nth-of-type(1),
    .column:nth-of-type(2) {
        flex: 1 1 calc(50% - 0.5rem);
    }
    .column:nth-of-type(3) {
        flex: 1 1 100%;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    .scrollable-content {
        overflow-y: visible;
        flex-grow: 0;       
        padding-right: 0;
    }

    .graph-container {
        min-height: 350px;
    }

    /* === NOVÉ ŠTÝLY PRE MODÁLNE OKNÁ === */
    .modal-content {
        width: 95%; /* Využije viac priestoru na šírku */
        padding: 1.5rem; /* Zmenší odsadenie */
        max-height: 85vh;
    }

    .modal-header {
        padding-bottom: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .modal-title {
        font-size: 1.3rem; /* Zmenší nadpis */
    }
}
