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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===== Container & Pages ===== */
#container {
    width: 100%;
    max-width: 450px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page1, .page2, .page3 {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 32px;
    min-height: 500px;
    animation: fadeIn 0.4s ease-out;
}

.page1 {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== Form Header ===== */
.form-header {
    text-align: center;
}

.form-header h1,
.form-header h2 {
    color: #1a202c;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #718096;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* ===== Form Groups & Inputs ===== */
.form-group {
    margin-bottom: 24px;
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

label {
    display: block;
    color: #2d3748;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f9fafb;
    color: #1a202c;
    transition: all 0.3s ease;
    font-family: inherit;
}

input::placeholder {
    color: #a0aec0;
}

input:hover {
    border-color: #cbd5e0;
    background-color: #ffffff;
}

input:focus {
    outline: none;
    border-color: #4c51bf;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

input.inputError {
    border-color: #f56565;
    background-color: #fff5f5;
}

input.inputError:focus {
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

/* ===== Error Messages ===== */
.error-message {
    display: block;
    color: #e53e3e;
    font-size: 12px;
    margin-top: 6px;
    animation: shake 0.3s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ===== Options (Page 2) ===== */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f9fafb;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
}

.option:hover {
    border-color: #cbd5e0;
    background-color: #ffffff;
}

.option.active {
    border-color: #4c51bf;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(79, 70, 229, 0.02) 100%);
    color: #2d3748;
}

.option-icon {
    font-size: 20px;
}

.option-text {
    flex: 1;
}

.option.active::after {
    content: '✓';
    color: #4c51bf;
    font-weight: 700;
    font-size: 16px;
    margin-left: auto;
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* ===== Success Container ===== */
.success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4c51bf 0%, #5a67d8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    animation: scaleIn 0.5s ease-out;
    font-weight: bold;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-container h2 {
    color: #1a202c;
    font-size: 24px;
    margin-top: 8px;
}

.success-message {
    color: #718096;
    font-size: 14px;
    line-height: 1.6;
    margin: 12px 0 24px 0;
}

/* ===== Buttons ===== */
.button-container {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    justify-content: center;
}

.btn {
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #4c51bf 0%, #5a67d8 100%);
    color: white;
    flex: 1;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #2d3748;
    flex: 1;
}

.btn-secondary:hover {
    background-color: #cbd5e0;
}

/* ===== Step Indicator ===== */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #cbd5e0;
    transition: all 0.3s ease;
}

.dot.active {
    background: linear-gradient(135deg, #4c51bf 0%, #5a67d8 100%);
    transform: scale(1.2);
}

/* ===== Responsive Design ===== */
@media (max-width: 600px) {
    #container {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
    }

    .page1, .page2, .page3 {
        padding: 32px 20px;
        min-height: auto;
    }
    .form-header {
        margin-bottom: 34px;
    }
    .form-header h1,
    .form-header h2 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 13px;
    }

    .button-container {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    input {
        padding: 14px 12px;
        font-size: 16px;
    }

    label {
        font-size: 12px;
    }

    .option {
        padding: 14px 12px;
        font-size: 13px;
    }

    body {
        padding: 0;
    }
}

@media (max-width: 400px) {
    .form-header h1,
    .form-header h2 {
        font-size: 20px;
    }

    .form-header {
        margin-bottom: 24px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .page1, .page2, .page3 {
        padding: 24px 16px;
    }
}