:root {
    --bg: #090a0f;           
    --card-bg: #12141c;      
    --border: #222633;       
    --text-main: #f8fafc;    
    --text-muted: #64748b;   
    --accent: #94a3b8;      
    --accent-hover: #cbd5e1; 
    --profit: #10b981;       
    --loss: #ef4444;         
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    padding-top: 5rem;       
    min-height: 100vh;
    overflow-x: hidden;
}

.login-screen {
    width: 100%;
    max-width: 360px;
    text-align: center;
    margin-top: 10vh;
    animation: fadeIn 0.4s ease-out;
}

.login-screen h1 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    letter-spacing: -0.05rem;
    font-weight: 700;
}

.dashboard {
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem 5rem 2rem;
    display: none; 
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
    animation: fadeIn 0.5s ease-out;
}

header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.03rem;
    color: var(--text-main);
}


.dashboard .card:nth-of-type(1) {
    flex: 1 1 360px; 
}

.dashboard .card:nth-of-type(2) {
    flex: 2 1 640px; 
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border); 
    border-radius: 8px;             
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); 
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-2px); 
    border-color: var(--text-muted); 
}

h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    color: var(--text-muted); 
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.input-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input {
    width: 100%;
    background: #0d0f16; 
    border: 1px solid var(--border); 
    border-radius: 6px; 
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    background: #12141c;
}

button {
    width: 100%;
    background: var(--accent);
    color: #090a0f; 
    border: none;
    border-radius: 6px;
    padding: 0.85rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    margin-top: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--accent);
}

.risk-result {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.risk-value {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.05rem;
    color: var(--text-main);
}

.table-container {
    margin-top: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #0d0f16;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0.85rem 1rem;
    background: #12141c;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

.profit { color: var(--profit); }
.loss { color: var(--loss); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
    .dashboard { 
        flex-direction: column; 
        padding: 0 1rem 5rem 1rem;
    }
    body { padding-top: 2rem; }
}

footer.support {
    z-index: 10000;
    display: block;
    text-align: center !important;
    font-size: 0.7rem;
    color: var(--text-muted);
    position: fixed;
    bottom: 20px;
    width: 100%; 
    left: 0;
    animation: fadeIn 1.5s ease;
}

footer.support a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

footer.support a:hover {
    color: var(--text-main);
}