﻿
:root {
    --accent-color: #2ecc71;
    /* High-tech green */
    --text-main: #2c3e50;
    --bg-light: #ffffff;
    --border-style: 1px solid #e0e0e0;
}

body {
    /* margin: 0;
            height: 100vh;
            display: flex;
            flex-direction: column; Changed to handle multiple buttons */
    /* gap: 20px;
    justify-content: center;
    align-items: center;
    background-color: #f4f7f6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;*/
}

/* Trigger Button */
.open-btn {
    padding: 12px 24px;
    font-weight: 600;
    color: white;
    background: var(--accent-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 200px;
}

    .open-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
    }

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    z-index: 1000;
}

/* The Animated White Modal */
.metric-modal {
    background: var(--bg-light);
    /* height: 70%; */
    padding: 40px;
    border-radius: 12px;
    border: var(--border-style);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    position: relative;
    transform: scale(0.9) translateY(30px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Show State */
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

    .modal-overlay.active .metric-modal {
        transform: scale(1) translateY(0);
    }

/* Modal Content */
.modal-title {
   /* font-family: 'Courier New', monospace;*/
    color: var(--accent-color);
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

    .modal-title::before {
        content: "";
        width: 10px;
        height: 10px;
        background: var(--accent-color);
        display: inline-block;
        margin-right: 10px;
        border-radius: 50%;
        animation: pulse 1.5s infinite;
    }

.modal-body {
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* --- UPDATED SCROLL BEHAVIOR --- */
.metric-data {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 1.4rem;
    color: #666;
    border-left: 4px solid var(--accent-color);
    max-height: 350px;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-color: #4CAF50 #ffffff;
}

    .metric-data::-webkit-scrollbar {
        width: 7px;
    }

    .metric-data::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .metric-data::-webkit-scrollbar-thumb {
        background: var(--accent-color);
        border-radius: 10px;
    }

.close-link {
    display: inline-block;
    margin-top: 10px;
    color: #999;
    text-decoration: none;
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s;
    bottom: 15px;
    position: absolute;
    right: 50px;
}

    .close-link:hover {
        color: #333;
    }

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}
