@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Modern Color Palette */
    --primary-color: #3b82f6;
    /* Blue 500 */
    --primary-dark: #2563eb;
    /* Blue 600 */
    --primary-light: #eff6ff;
    /* Blue 50 */
    --secondary-color: #64748b;
    /* Slate 500 */
    --success-color: #10b981;
    /* Emerald 500 */
    --background-color: #f8fafc;
    /* Slate 50 */
    --card-background: #ffffff;
    --text-main: #1e293b;
    /* Slate 800 */
    --text-secondary: #475569;
    /* Slate 600 */
    --border-color: #e2e8f0;
    /* Slate 200 */
    --input-focus-ring: rgba(59, 130, 246, 0.4);

    /* Spacing & Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--background-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 24px 24px;
}

.container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.card {
    background: var(--card-background);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

/* Header Styling */
.header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Step Styling */
.step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step h2::before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 4px;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.75rem;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
}

/* Inputs & Selects */
.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: #fff;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--input-focus-ring);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Radio & Checkbox Groups */
.radio-group,
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.radio-label:hover,
.checkbox-label:hover {
    background-color: var(--background-color);
    border-color: #cbd5e1;
}

/* Selected State using :has() */
.radio-label:has(input:checked),
.checkbox-label:has(input:checked) {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-dark);
    font-weight: 600;
    box-shadow: 0 0 0 1px var(--primary-color);
}

.radio-label input,
.checkbox-label input {
    margin-left: 0.75rem;
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--primary-color);
}

/* Buttons */
.buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--background-color);
    color: var(--text-main);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(16, 185, 129, 0.3);
}

/* Hidden Utility */
.hidden {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .card {
        padding: 1.5rem;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .radio-group,
    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .buttons {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }
}