/* --- Global Reset & Variables --- */
:root {
    --bg-color: #101010;
    --card-color: #1B1B1B;
    --text-color: #E0E0E0;
    --text-muted: #888888;
    --accent-color: #00A8FF;
    --accent-color-glow: rgba(0, 168, 255, 0.2);
    --positive-color: #26A69A;
    --negative-color: #EF5350;
    --border-color: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.02), transparent 30%),
                      radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.02), transparent 30%);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- Header & Footer --- */
header {
    text-align: center;
    padding: 40px 20px;
}

header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-color);
    text-shadow: 0 0 10px var(--accent-color-glow);
}

header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: 10px;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* --- REVENUE / ADVERTISEMENT STYLES --- */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 24px auto;
    background-color: #222;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
}
.ad-container span {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}
.ad-container-leaderboard {
    width: 728px;
    height: 90px;
    max-width: 95%;
}
.ad-container-mrec {
    width: 300px;
    height: 250px;
}


/* --- Dashboard Grid --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    padding: 0 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.grid-span-full {
    grid-column: 1 / -1;
    justify-self: center;
}

/* --- Data Card Styling --- */
.data-card {
    background: linear-gradient(145deg, #1f1f1f, #1a1a1a);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.data-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--accent-color-glow);
}

.data-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.data-card h2 svg {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
    flex-shrink: 0;
}

.card-content {
    padding: 20px;
    min-height: 150px;
}

/* --- Data List Styling --- */
.data-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.data-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}

.data-list .label {
    font-weight: 600;
}

.data-list .label span {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-left: 8px;
}

.data-list .value {
    font-weight: 600;
    font-size: 1.1rem;
}

.positive {
    color: var(--positive-color) !important;
}

.negative {
    color: var(--negative-color) !important;
}

.error {
    color: var(--negative-color);
    font-weight: 600;
}


/* --- Loader --- */
.loader {
    width: 48px;
    height: 48px;
    border: 3px solid var(--text-muted);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: block;
    margin: 40px auto;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* --- Calculator Module Styling --- */
.calc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 1em;
}


.calc-button {
    background-color: var(--accent-color);
    color: #FFFFFF;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    margin-top: 10px;
}

.calc-button:hover {
    background-color: #008ecc;
    transform: scale(1.02);
}

.calc-results {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.calc-results h3 {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 1rem;
}

.calc-results .final-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--positive-color);
    margin-top: 8px;
}

.result-label-secondary {
    margin-top: 15px;
    color: var(--text-muted);
}
.final-amount-secondary {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 600;
}


/* --- News Module Styling --- */
.news-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.news-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}
.news-item:last-child {
    border-bottom: none;
}

.news-title a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
}

.news-title a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.news-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* --- Scrollbar Styling for News Feed --- */
.news-list::-webkit-scrollbar {
    width: 8px;
}
.news-list::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}
.news-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}
.news-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}