@import url('https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&family=Noto+Sans+Georgian:wght@100..900&display=swap');
@import url("//cdn.web-fonts.ge/fonts/bpg-nino-elite-caps/css/bpg-nino-elite-caps.min.css");

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

/* ========== BASE STYLES ========== */
body {
    font-family: "Fira Mono", monospace;
    background: #ffffff;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ========== HEADER ========== */
header {
    text-align: center;
    color: rgb(36, 28, 28);
    margin-bottom: 15px;
    text-transform: uppercase;
}

h2 {
    font-size: 2rem;
    margin-bottom: 5px;
    font-family: "BPG Nino Elite Caps", sans-serif;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ========== DASHBOARD ========== */
.dashboard {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(130, 129, 129, 0.3);
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

/* ========== CHART SECTION ========== */
.chart-container {
    position: relative;
    height: 450px;
    padding-bottom: 50px;
    width: 100%;
}

.chart-legend {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 10px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10;
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    flex-wrap: nowrap;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.chart-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ========== INSIGHTS GRID ========== */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    width: 100%;
}

.insight-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.insight-card h3 {
    font-size: 0.75rem;
    font-family: "BPG Nino Elite Caps", sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 10px;
}

.insight-value {
    font-size: 1.5rem;
    font-weight: 300;
    color: #333;
    margin-bottom: 5px;
}

.insight-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.change-positive {
    color: #10b981;
}

.change-negative {
    color: #ef4444;
}

.change-neutral {
    color: #6b7280;
}

/* ========== MODALS ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    z-index: 1001;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header h3 {
    font-family: "BPG Nino Elite Caps", sans-serif;
    margin: 0;
    font-size: 1.3rem;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.modal-body {
    padding: 24px 30px;
}

.modal-body p {
    margin-bottom: 16px;
    line-height: 1.6;
    color: #555;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-body strong {
    color: #333;
}

.modal a {
    color: #667eea;
    text-decoration: none;
}

.modal a:hover {
    text-decoration: underline;
}

/* ========== FOOTER ========== */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 10px;
}

.last-update {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.last-update-label {
    color: #666;
    font-weight: 500;
}

.last-update-value {
    color: #333;
    font-weight: 600;
}

.footer-actions {
    display: flex;
    gap: 8px;
}

.footer-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: "BPG Nino Elite Caps", sans-serif;
    font-size: 0.8rem;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.footer-button:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.footer-button svg {
    width: 14px;
    height: 14px;
}

.footer-content {
    display: flex;
    align-items: left;
    justify-content: left;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 12px;
    font-family: "BPG Nino Elite Caps", sans-serif;
}

.footer-logo-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.footer-logo-img {
    width: 75px;
    height: auto;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-divider {
    margin: 0 8px;
    color: #d1d5db;
}

/* ========== SOCIAL SHARE ========== */


.social-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.share-button.facebook {
    color: #1877f2;
}

.share-button.facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.share-button.linkedin {
    color: #0a66c2;
}

.share-button.linkedin:hover {
    background: #0a66c2;
    color: white;
    border-color: #0a66c2;
}

.share-button.email {
    color: #666;
}

.share-button.email:hover {
    background: #666;
    color: white;
    border-color: #666;
}

/* ========== UTILITY ========== */
.legend {
    display: none;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1200px) {
    .insights-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .insight-card:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.8rem;
    }

    .dashboard {
        padding: 20px;
    }

    .footer-top {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        font-family: "BPG Nino Elite Caps", sans-serif;
    }

    .last-update {
        justify-content: center;
    }

    .footer-actions {
        flex-direction: column;
    }

    .footer-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid #e5e7eb;
        flex-wrap: wrap;
        gap: 15px;
    }

    .footer-button {
        justify-content: center;
    }

    .social-share {
        justify-content: center;
    }

    .chart-container {
        height: 350px;
        padding-bottom: 60px;
    }

    .chart-legend {
        flex-wrap: wrap;
        max-width: 95%;
        gap: 8px 12px;
        padding: 8px 15px;
    }

    .chart-legend-item {
        font-size: 0.75rem;
    }

    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .insight-card:first-child {
        grid-column: 1;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-body {
        padding: 20px;
    }
}