/* ================================== */
/* --- Preloader Styles --- */
/* ================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: #1c1c1c;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.7s, visibility 0.7s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================== */
/* --- အခြေခံနှင့် Font --- */
/* ================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Padauk', 'Myanmar Text', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-y: auto; 
    padding: 20px;
}

/* ================================== */
/* --- လှုပ်ရှားနေသော နောက်ခံ --- */
/* ================================== */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(300deg, #ff8c00, #ff007f, #4a00e0, #00c6ff);
    background-size: 300% 300%;
    animation: moveGradient 20s ease-in-out infinite;
}

@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ================================== */
/* --- Panel နှင့် အခန်းကဏ္ဍများ --- */
/* ================================== */
.panel-container {
    width: 90%;
    max-width: 550px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
    color: #fff;
}

.content-section {
    display: none;
    animation: fadeIn 0.6s ease-out;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================================== */
/* --- စာသားနှင့် ခေါင်းစဉ်များ --- */
/* ================================== */
h1, h2 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 700;
    background: linear-gradient(90deg, #f8ffae, #43e695, #22a7f0, #c86dd7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

h2 {
    font-size: 24px;
}

p {
    font-size: 16px;
    margin-bottom: 40px;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* ================================== */
/* --- ခလုတ်များ --- */
/* ================================== */
.download-links { margin-bottom: 30px; }

.menu-btn, .download-btn, .back-btn {
    display: block;
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    cursor: pointer;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.menu-btn, .download-btn {
    background: rgba(255, 255, 255, 0.15);
}
.menu-btn:hover, .download-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.back-btn {
    background: rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}
.back-btn:hover {
    background: rgba(0, 0, 0, 0.4);
}


/* ============================================================= */
/* --- "ဖန်တီးသူအကြောင်း" BOX အတွက် --- */
/* ============================================================= */
#about-text-section .info-card {
    padding: 30px; 
    margin-top: 20px;
    margin-bottom: 25px; 
    position: relative;
    border-radius: 18px;
    border: none;
    background: transparent;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(109, 117, 215, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
}

#about-text-section .info-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: conic-gradient(from 0deg, #00f6ff, #c86dd7, #f8ffae, #00f6ff);
    animation: rotateBorder 6s linear infinite;
    z-index: -2;
}

#about-text-section .info-card::after {
    content: '';
    position: absolute;
    z-index: -1;
    top: 2px;
    left: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    background: #18122B;
    border-radius: 16px;
}

#about-text-section .info-card:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 246, 255, 0.5);
}

#about-text-section .info-card p {
    text-align: left;
    margin-bottom: 0;
    line-height: 1.8;
    font-size: 17px;
    color: #ffffff;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

#about-text-section .info-card .developer-name {
    margin-top: 25px; 
    padding-top: 15px; 
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    text-align: right; 
    font-size: 16px;
    font-weight: 700; 
    color: #f8ffae; 
    text-shadow: 0 0 5px #f8ffae, 0 0 10px rgba(0, 0, 0, 0.5);
}

/* ================================== */
/* --- Media Queries --- */
/* ================================== */
@media (min-width: 576px) {
    h2 {
        font-size: 28px;
    }
}
@media (max-width: 420px) {
    .panel-container {
        padding: 25px;
    }
    h1 {
        font-size: 28px;
    }
    h2 {
        font-size: 22px;
    }
    .menu-btn, .download-btn, .back-btn {
        padding: 12px 15px;
        font-size: 16px;
    }
    #about-text-section .info-card {
        padding: 20px;
    }
}

/* ================================== */
/* --- Server Choice Modal Styles --- */
/* ================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    padding: 30px;
    background: rgba(24, 18, 43, 0.85);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
    color: #fff;
    width: 90%;
    max-width: 400px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-content h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #43e695;
}

.modal-content p {
    font-size: 16px;
    margin-bottom: 25px;
}

.modal-links a {
    margin-bottom: 15px;
}

.modal-content #modal-close-btn {
    margin-top: 10px;
    margin-bottom: 0;
}