/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0a192f;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Watermark */
.watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 300px;
    font-family: 'Times New Roman', Times, serif;
    color: rgba(255, 255, 255, 0.05);
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
}

/* Header */
.header {
    background-color: #112240;
    padding: 2rem 1rem;
    text-align: center;
    z-index: 1;
}

/* Flex Container */
.flex-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 3rem 2rem;
    flex: 1;
    gap: 2rem;
    z-index: 1;
}

/* Flex Items */
.flex-item {
    background-color: #1e2a47;
    padding: 2rem;
    border-radius: 10px;
    width: 300px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.flex-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); 
}

/* Footer */
.footer {
    background-color: #112240;
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    z-index: 1;
}

/* Modal */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.custom-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease forwards; 
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.custom-modal-content {
    background: #ffffff;
    color: #112240;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative; 
}

/* Close Button (X) inside Modal */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #1e3c72;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #ff9f00;
}

/* Modal Button */
.modal-actions {
    margin-top: 1.5rem;
}

.modal-actions button {
    background-color: #112240;
    color: #fff;
    border: none;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-actions button:hover {
    background-color: #1e2a47;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 5px;
    background: orangered;
    width: 0%;
    z-index: 1000;
}

/* Responsive */
@media (max-width: 1024px) {
    .flex-container {
        padding: 2rem 1rem;
    }

    .flex-item {
        width: 45%; /* Increased flexibility on mid-range screens */
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1.5rem 0.5rem;
    }

    .flex-container {
        flex-direction: column;
        align-items: center;
        padding: 1rem 0.5rem;
    }

    .flex-item {
        width: 80%;
    }

    .watermark {
        font-size: 150px;
    }

    .footer {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .flex-item {
        width: 100%;
        padding: 1.5rem;
    }

    .watermark {
        font-size: 100px;
    }

    .footer {
        font-size: 0.75rem;
    }
}
