:root {
    --primary: #007bb8;
    --primary-hover: #006094;
    --accent: #ff0000;
    --bg-color: #f8fbff;
    --card-bg: #ffffff;
    --text-main: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --error: #e53e3e;
    --radius: 16px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    --transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 580px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    min-height: 400px;
}

form {
    position: relative;
    width: 100%;
    height: 100%;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(30px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    pointer-events: none;
}

.screen.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: all;
}

/* Typography */
.header-center img {
    display: block;
    width: 40%;
    margin: 0 auto 30px auto;
}

.brand-title {
    color: var(--primary);
    font-weight: 600;
    font-size: 24px;
    margin-bottom: 10px;
}

h2 {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-main);
}

.header-center h2 {
    font-size: 18px;
}

p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
}

p.subtitle {
    margin-bottom: 25px;
}

/* Inputs */
.input-group {
    margin-bottom: 20px;
}

.input-row {
    display: flex;
    gap: 15px;
}

.input-row .input-group {
    flex: 1;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 184, 0.1);
}

textarea {
    resize: vertical;
}

.section-block {
    background: #fdfdfd;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.section-block h3 {
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--primary);
}

.section-block input {
    margin-bottom: 10px;
}

/* Selection Cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.card-option {
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.card-option:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.card-option.selected {
    border-color: var(--primary);
    background: rgba(0, 123, 184, 0.05);
    color: var(--primary);
}

/* Buttons */
.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.button-group.right {
    justify-content: flex-end;
}

.button-group.center {
    justify-content: center;
}

.btn {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    outline: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 184, 0.2);
}

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

.btn-secondary:hover {
    background: #e2e8f0;
}

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

.error-msg {
    color: var(--error);
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-msg.visible {
    display: block;
}

/* OTP Screen */
.otp-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.otp-input {
    width: 45px !important;
    height: 55px;
    text-align: center;
    font-size: 20px !important;
    font-weight: 600;
    padding: 0 !important;
}

.resend-text {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
}

.resend-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* Success Screen */
.success-container {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(0, 123, 184, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.success-icon svg {
    width: 40px;
    height: 40px;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .screen {
        padding: 30px 20px;
    }
    .input-row {
        flex-direction: column;
        gap: 0;
    }
}