/* Phone Verification Page Styles */

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

:root {
    --primary-red: #8B0000;
    --primary-dark: #5C0000;
    --secondary-red: #DC143C;
    --text-light: #FFFFFF;
    --text-gray: rgba(255, 255, 255, 0.7);
    --border-color: rgba(255, 255, 255, 0.2);
    --background-dark: #000000;
    --success-green: #28A745;
}

body {
    font-family: 'Inter', sans-serif;
    background: #000;
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.verify-container {
    max-width: 480px;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(139, 0, 0, 0.3);
    padding: 3rem 2.5rem;
    position: relative;
    z-index: 10;
}

/* Logo Section */
.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
}

.logo {
    width: 56px;
    height: 56px;
    margin-bottom: 0.5rem;
}

.brand-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--text-light);
}

/* Step Container */
.step-container {
    animation: fadeInUp 0.4s ease-out;
}

.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.step-subtitle {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.5;
}

.phone-display {
    color: var(--primary-red);
    font-weight: 600;
}

/* Phone Input Section */
.phone-input-section {
    margin-bottom: 2rem;
}

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.phone-input-wrapper {
    display: flex;
    gap: 0.75rem;
}

.country-code {
    width: 100px;
    padding: 0.875rem 0.75rem;
    font-size: 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none; /* Remove iOS default styling */
    appearance: none;
}

.country-code:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.phone-input {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    -webkit-appearance: none; /* Remove iOS default styling */
    appearance: none;
}

.phone-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.phone-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-hint {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Code Input Section */
.code-input-section {
    margin-bottom: 2rem;
}

.code-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.code-digit {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

.code-digit:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.code-digit.filled {
    border-color: var(--primary-red);
    background: rgba(139, 0, 0, 0.2);
}

/* Resend Section */
.resend-section {
    text-align: center;
    margin-bottom: 2rem;
}

.btn-resend {
    width: 100%;
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 999px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-resend:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.btn-resend:active:not(:disabled) {
    transform: translateY(0);
}

.btn-resend:disabled {
    color: var(--text-gray);
    cursor: not-allowed;
    opacity: 0.4;
    border-color: rgba(255, 255, 255, 0.1);
}

#resendTimer {
    color: var(--text-gray);
    font-size: 0.875rem;
}

/* Error Message */
.error-message {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1.125rem 2rem;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    color: var(--text-light);
    border: none;
    border-radius: 999px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(139, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139, 0, 0, 0.4);
}

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

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-skip {
    width: 100%;
    padding: 0.875rem;
    background: transparent;
    color: var(--text-gray);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.btn-skip:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
    background: rgba(139, 0, 0, 0.05);
}

.btn-back {
    width: 100%;
    padding: 1rem 2rem;
    background: transparent;
    color: var(--text-light);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    margin-top: 0.5rem;
}

.btn-back:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

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

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Container */
.success-container {
    text-align: center;
    padding: 2rem 0;
    animation: fadeInUp 0.5s ease-out;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    animation: scaleIn 0.5s ease-out;
}

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

.success-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.success-text {
    font-size: 0.95rem;
    color: var(--text-gray);
}

/* Decorative Elements */
.decorative-circle {
    position: fixed;
    border-radius: 50%;
    background: var(--primary-red);
    opacity: 0.08;
    z-index: 1;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
}

.decorative-cross {
    position: fixed;
    font-size: 8rem;
    color: var(--primary-red);
    opacity: 0.1;
    bottom: 10%;
    right: 5%;
    z-index: 1;
    font-family: 'Cormorant Garamond', serif;
    transform: rotate(15deg);
}

/* Mobile Optimization */
@media (max-width: 640px) {
    body {
        padding: 1rem 0.5rem;
    }

    .verify-container {
        padding: 2rem 1.25rem;
        border-radius: 12px;
    }

    .logo {
        width: 56px;
        height: 56px;
    }

    .brand-name {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .step-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .step-subtitle {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* Mobile-optimized phone input */
    .country-code {
        padding: 1rem 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 54px;
    }

    .phone-input {
        padding: 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 54px;
    }

    /* Mobile-optimized code inputs */
    .code-digit {
        width: 48px;
        height: 58px;
        font-size: 1.35rem;
        border-width: 2px;
    }

    .code-inputs {
        gap: 0.375rem;
    }

    /* Mobile-optimized buttons */
    .btn-primary {
        padding: 1.125rem;
        font-size: 1rem;
        min-height: 56px;
    }

    .btn-skip,
    .btn-back,
    .btn-resend {
        padding: 1rem;
        font-size: 0.95rem;
        min-height: 52px;
    }

    .success-icon {
        width: 80px;
        height: 80px;
        font-size: 2.25rem;
    }

    .decorative-cross {
        font-size: 6rem;
        opacity: 0.08;
    }

    .decorative-circle {
        opacity: 0.05;
    }
}

/* Extra small mobile devices */
@media (max-width: 380px) {
    .verify-container {
        padding: 1.5rem 1rem;
    }

    .step-title {
        font-size: 1.35rem;
    }

    .step-subtitle {
        font-size: 0.85rem;
    }

    .code-digit {
        width: 44px;
        height: 54px;
        font-size: 1.25rem;
    }

    .code-inputs {
        gap: 0.3rem;
    }

    .phone-input-wrapper {
        gap: 0.5rem;
    }

    .country-code {
        width: 90px;
        padding: 0.875rem 0.5rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Button Fixes for Phone Auth */
.primary-btn:hover:not(:disabled) {
    background: #5C0000 !important;
    transform: translateY(-1px);
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
