:root {
    --primary: #1a73e8;
    --primary-dark: #155bb5;
    --bg: #f1f6f9;
    --text: #333;
    --light: #ffffff;
    --accent: #e8f0fe;
}

body.dark-mode {
    --bg: #1e1e1e;
    --text: #f1f1f1;
    --light: #2c2c2c;
    --accent: #333;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-content {
    background-color: var(--accent);
    padding: 2.5rem 3rem;
    border-radius: 24px;
    max-width: 460px;
    width: 90%;
    position: relative;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(255, 255, 255, 0.05);
    animation: fadeInScale 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    font-family: 'Segoe UI', sans-serif;
    color: var(--text);
    user-select: none;
}

.close-button {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    font-size: 1.8rem;
    color: var(--text);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.25s ease;
    padding: 0;
    line-height: 1;
    user-select: none;
}
.close-button:hover,
.close-button:focus {
    color: var(--primary);
    outline: none;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }
    60% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    40% {
        opacity: 0.6;
        transform: scale(0.95);
    }
    100% {
        opacity: 0;
        transform: scale(0.85);
    }
}
