/* 1. Global Reset & Main Page Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #333;
}

.page-content {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.page-content h1 {
    font-size: 42px;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.page-content p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
}

/* 2. Modal Overlay (The Background) */
.modal-overlay {
    position: fixed; /* Locks it to the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent black */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensures it sits on top of all other elements */
    
    /* Hidden State & Animation Setup */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease; /* Smooth fade */
}

/* 3. The Modal Box */
.modal-box {
    background-color: #ffffff;
    width: 90%;
    max-width: 450px;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative; /* Allows absolute positioning of the close button inside */
    text-align: center;
    
    /* Entry Animation Setup */
    transform: translateY(-50px); /* Starts slightly above its final position */
    transition: transform 0.4s ease; /* Controls the sliding drop speed */
}

.modal-box h2 {
    margin-bottom: 10px;
    color: #1a1a1a;
}

.modal-box p {
    color: #666;
    margin-bottom: 25px;
    font-size: 15px;
}

/* 4. Modal Form */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-form input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
}

.modal-form input:focus {
    border-color: #007bff;
}

/* 5. The Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #ff4d4d;
}

/* 6. Active Classes (Toggled by JavaScript) */
.modal-overlay.show-modal {
    opacity: 1; /* Makes the background visible */
    visibility: visible;
}

.modal-overlay.show-modal .modal-box {
    transform: translateY(0); /* Drops the box smoothly into its natural position */
}