* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
}

.header {
    background: #a46e29;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.header-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-login, .btn-register {
    padding: 0.5rem 1.25rem;
    border-radius: 0;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid white;
}

.btn-login {
    background: transparent;
    color: white;
}

.btn-login:hover {
    background: white;
    color: #a46e29;
}

.btn-register {
    background: white;
    color: #a46e29;
}

.btn-register:hover {
    background: rgba(255, 255, 255, 0.9);
}

.exchange-rates-slider {
    background: #a46e29;
    padding: 1rem 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.slider-track {
    display: flex;
    gap: 1rem;
    animation: slide 30s linear infinite;
    width: fit-content;
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.rate-box {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 0;
    min-width: 280px;
    color: #333;
    white-space: nowrap;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rate-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.rate-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.rate-currency {
    font-weight: 700;
    font-size: 0.95rem;
    color: #a46e29;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 45px;
}

.rate-buy {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    flex: 1;
    text-align: right;
}

.rate-change {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

.rate-change.change-up {
    color: #28a745;
}

.rate-change.change-down {
    color: #dc3545;
}

.top-banner {
    background: #e0e0e0;
    padding: 1rem;
    text-align: center;
    border-bottom: 2px solid #a46e29;
}

.banner-placeholder {
    background: #d0d0d0;
    color: #666;
    padding: 2rem;
    border-radius: 0;
    font-weight: 600;
    max-width: 728px;
    margin: 0 auto;
}

.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    gap: 2rem;
}

.sidebar {
    width: 160px;
    flex-shrink: 0;
}

.ad-placeholder {
    background: #e0e0e0;
    color: #666;
    padding: 1rem;
    border-radius: 0;
    font-weight: 600;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #a46e29;
}

.main-content {
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

.footer {
    background: #333;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.content-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.prices-section {
    background: white;
    border-radius: 0;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 0;
    overflow-x: auto;
}

.prices-left {
    flex: 3;
    min-width: 0;
}

.sidebar-content {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0;
}

.section-title {
    font-size: 1.75rem;
    color: #a46e29;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #a46e29;
}

.prices-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.prices-table thead {
    background: #a46e29;
    color: white;
}

.prices-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.prices-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
    white-space: nowrap;
}

.prices-table tbody tr:hover {
    background: #f8f9fa;
    transition: background 0.2s;
}

.prices-table tbody tr:last-child td {
    border-bottom: none;
}

.price-buy {
    color: #28a745;
    font-weight: 600;
    font-size: 0.85rem;
}

.price-sell {
    color: #dc3545;
    font-weight: 600;
    font-size: 0.85rem;
}

.change-positive {
    color: #28a745;
    font-weight: 600;
    font-size: 0.85rem;
}

.change-negative {
    color: #dc3545;
    font-weight: 600;
    font-size: 0.85rem;
}

.change-icon {
    display: inline-block;
    margin-right: 0.25rem;
}

.gold-name {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
}

.mini-chart-cell {
    width: 120px;
    padding: 0.5rem !important;
}

.mini-chart {
    width: 120px;
    height: 40px;
    background: #f9f9f9;
    border-radius: 2px;
}

.mini-chart:empty::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.charts-section {
    background: white;
    border-radius: 0;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chart-container {
    width: 100%;
    height: 400px;
    margin-bottom: 2rem;
    position: relative;
    background: white;
}

.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-size: 0.9rem;
}

.chart-container:last-child {
    margin-bottom: 0;
}

.chart-title {
    font-size: 1.25rem;
    color: #555;
    margin-bottom: 1rem;
    font-weight: 600;
}

.calculator-section, .login-section {
    background: white;
    border-radius: 0;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.calculator-title, .login-title {
    font-size: 1.25rem;
    color: #a46e29;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #a46e29;
}

.calculator-form, .login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.form-input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #a46e29;
}

.btn-calculate, .btn-login-submit {
    padding: 0.75rem;
    background: #a46e29;
    color: white;
    border: none;
    border-radius: 0;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-calculate:hover, .btn-login-submit:hover {
    background: #8a5a20;
}

.calculator-result {
    margin-top: 1rem;
    padding: 1rem;
    min-height: 60px;
}

.result-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 1rem;
    border-radius: 0;
    color: #155724;
}

.result-success strong {
    display: block;
    margin-bottom: 0.5rem;
}

.result-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #a46e29;
}

.result-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 1rem;
    border-radius: 0;
    color: #721c24;
}

.login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.login-links a {
    color: #a46e29;
    text-decoration: none;
    transition: color 0.3s;
}

.login-links a:hover {
    color: #8a5a20;
    text-decoration: underline;
}

@media (max-width: 1200px) {
    .sidebar {
        display: none;
    }

    .page-wrapper {
        padding: 1rem;
    }

    .content-row {
        flex-direction: column;
    }

    .prices-left, .sidebar-content {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .header-content nav {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }

    .header-buttons {
        width: 100%;
        justify-content: center;
    }

    .btn-login, .btn-register {
        flex: 1;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .prices-table {
        font-size: 0.85rem;
    }

    .prices-table th,
    .prices-table td {
        padding: 0.75rem 0.5rem;
    }

    .mini-chart {
        width: 100px;
        height: 40px;
    }

    .chart-container {
        height: 300px;
    }

    .rate-box {
        min-width: 240px;
        padding: 0.4rem 0.8rem;
        gap: 0.5rem;
    }

    .rate-flag {
        width: 20px;
        height: 15px;
    }

    .rate-currency {
        font-size: 0.85rem;
        min-width: 40px;
    }

    .rate-buy {
        font-size: 0.8rem;
    }

    .rate-change {
        font-size: 0.75rem;
        min-width: 50px;
    }
}

