/* style.css */
:root {
    --bg-primary: #1a1d24;
    --bg-secondary: #252a34;
    --bg-tertiary: #313843;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-blue: #4fc3f7;
    --accent-orange: #f57c00;
    --border-color: #3f4a5c;
    --success-color: #4caf50;
    --error-color: #f44336;
    --gradient-border: linear-gradient(135deg, var(--accent-blue), var(--accent-orange));
    --option-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    --option-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.3);
    --icon-color: var(--accent-blue); /* Color for input icons */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    direction: rtl;
}

/* --- Splash Screen Styles --- */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#splash-logo {
    max-width: 250px;
    width: 70%;
    animation: zoomFadeIn 1.5s ease-out forwards;
}

@keyframes zoomFadeIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

body.loaded #splash-screen {
    opacity: 0;
    visibility: hidden;
}

body.loaded {
    overflow: auto;
}

/* --- Main Content Area --- */
#main-content {
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 10px 20px;
    opacity: 0;
    transition: opacity 0.5s ease-in 0.5s;
}

body.loaded #main-content {
    opacity: 1;
}

.page-logo {
    position: absolute; 
    top: -15px; 
    left: -15px;
    max-width: 100px;
    opacity: 0.5;
    z-index: 0; 
    pointer-events: none;
}

/* --- Form Container --- */
.form-container {
    position: relative;
    background-color: var(--bg-secondary);
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 550px;
    text-align: center;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

h1 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 2em;
    font-weight: 700;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1em;
}

/* --- Form Groups and Input Fields with Icons --- */
.form-group {
    margin-bottom: 25px;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.95em;
}

.input-group {
    position: relative; 
}

.input-group .input-icon {
    position: absolute;
    top: 50%;
    right: 15px; 
    transform: translateY(-50%);
    color: var(--icon-color);
    font-style: normal;
    font-size: 1.2em;
    z-index: 1;
    pointer-events: none;
}

.input-group .user-icon {
    font-size: 1.2em;
}


.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 12px 45px 12px 15px; 
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.3);
}

.form-group input::placeholder {
    color: #6c757d;
}

/* --- Enhanced Platform Selector --- */
.platform-selector {
    margin-bottom: 35px;
    text-align: right;
    padding: 20px;
    background-color: rgba(0,0,0, 0.1);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.selector-title {
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 2px solid;
    border-image-slice: 1;
    border-image-source: var(--gradient-border);
    display: inline-block;
}

.platform-options {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.platform-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    flex: 1;
    background-color: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
    min-height: 130px;
    box-shadow: var(--option-shadow);
}

.platform-option::before {
    content: '';
    position: absolute;
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    background: var(--gradient-border);
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.platform-option input[type="radio"] {
    display: none;
}

.platform-option img {
    width: 45px;
    height: 45px;
    margin-bottom: 12px;
    border-radius: 8px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.platform-option span {
    font-size: 1em;
    color: var(--text-primary);
    font-weight: 700;
    text-align: center;
}

.platform-option:hover {
    transform: translateY(-5px);
    box-shadow: var(--option-shadow-hover);
    border-color: rgba(255, 255, 255, 0.1);
}
.platform-option:hover img {
     transform: scale(1.1);
}

.platform-option.selected {
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--option-shadow-hover);
}

.platform-option.selected::before {
    opacity: 1;
}

.platform-option.selected img {
    transform: scale(1.05);
}

/* --- Submit Button --- */
.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--gradient-border);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    margin-top: 15px;
    background-size: 200% auto;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 195, 247, 0.2), 0 8px 20px rgba(245, 124, 0, 0.2);
    background-position: right center;
}

/* --- SweetAlert2 Dark Theme Adjustments --- */
.swal2-popup {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-radius: 15px !important;
    border: 1px solid var(--border-color) !important;
}

.swal2-title {
    color: var(--text-primary) !important;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
    text-align: right !important;
}

.swal2-confirm-button {
    background: var(--accent-blue) !important;
    color: var(--bg-primary) !important;
    border-radius: 8px !important;
}
.swal2-confirm-button:focus {
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.4) !important;
}

.swal2-cancel-button {
    background-color: var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
}

.swal2-timer-progress-bar {
    background: var(--gradient-border) !important;
}

/* --- Responsive Design --- */
@media (max-width: 600px) {
    #main-content {
        padding: 30px 15px;
    }
    .form-container {
        padding: 20px;
    }
    h1 {
        font-size: 1.5em;
    }
    .platform-options {
        flex-direction: column;
        gap: 15px;
    }
     .platform-option {
        flex-direction: row;
        justify-content: flex-start;
        padding: 15px;
        min-height: auto;
    }
    .platform-option img {
        margin-bottom: 0;
        margin-left: 15px;
    }
}

/* --- [FIX] Style for select input inside SweetAlert2 --- */
.swal2-select {
    width: 90% !important;
    margin: 1em auto !important;
    padding: 0.75em !important;
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 1em !important;
}

/* Style for the options inside the select dropdown */
.swal2-select option {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}