:root {
    --primary: #4d2773;
    --primary-light: #6a3a9d;
    --accent: #dba32a;
    --accent-hover: #f1b433;
    --bg-dark: #0f0a15;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --error: #f43f5e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Tajawal', -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    /* Allow scrolling */
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    /* Fix background */
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    opacity: 0.15;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    /* Fix background */
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    bottom: -200px;
    left: -200px;
    opacity: 0.1;
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.header {
    text-align: center;
    margin-bottom: 32px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Toggle Switch Styles */
.toggle-container {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--surface-border);
    position: relative;
}

.toggle-container input[type="radio"] {
    display: none;
}

.toggle-container label {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.toggle-container input[type="radio"]:checked+label {
    background: var(--accent);
    color: var(--bg-dark);
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header p {
    color: var(--text-muted);
    font-size: 15px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
    padding-left: 4px;
}

.input-wrapper {
    position: relative;
}

input,
select,
textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    resize: none;
    max-height: 200px;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 4px rgba(219, 163, 42, 0.1);
}

button {
    width: 100%;
    background: var(--accent);
    color: var(--bg-dark);
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(219, 163, 42, 0.4);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--bg-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.status-box {
    margin-top: 24px;
    padding: 16px;
    border-radius: 12px;
    font-size: 14px;
    display: none;
    text-align: center;
}

.status-box.error {
    background: rgba(244, 63, 94, 0.1);
    color: var(--error);
    border: 1px solid rgba(244, 63, 94, 0.2);
    display: block;
}

.status-box.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: block;
}

.footer-text {
    text-align: center;
    margin-top: 32px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Progress Bar Styles */
.progress-container {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--surface-border);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(219, 163, 42, 0.5);
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid transparent;
    background-clip: content-box;
}