/* Modal Overlay */
.yorkup-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yorkup-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.yorkup-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.yorkup-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
    padding: 0;
    width: 32px;
    height: 32px;
}

.yorkup-modal-close:hover {
    color: #333;
}

/* Auth Container */
.yorkup-auth-container {
    padding: 40px 30px;
}

.auth-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

/* Auth Steps */
.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

/* Method Tabs */
.auth-method-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.auth-tab:hover {
    background: #e8e8e8;
}

.auth-tab.active {
    background: #fff;
    border-color: #00a046;
    color: #00a046;
}

.auth-tab span:first-child {
    font-size: 20px;
}

/* Auth Form */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #00a046;
    box-shadow: 0 0 0 4px rgba(0, 160, 70, 0.1);
}

.code-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #00a046;
    color: #fff;
    width: 100%;
}

.btn-primary:hover {
    background: #008a3c;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 160, 70, 0.3);
}

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

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-back {
    background: transparent;
    border: none;
    color: #00a046;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    padding: 8px 0;
    transition: opacity 0.3s;
}

.btn-back:hover {
    opacity: 0.7;
}

.btn-link {
    background: transparent;
    border: none;
    color: #00a046;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    opacity: 0.8;
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e0e0e0;
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-divider span {
    background: #fff;
    padding: 0 15px;
    color: #999;
    font-size: 14px;
}

/* Social Auth Buttons */
.social-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-social {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #333;
}

.btn-social:hover {
    border-color: #00a046;
    background: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-social svg {
    flex-shrink: 0;
}

.btn-google {
    /* Google specific styles */
}

.btn-apple {
    /* Apple specific styles */
}

/* Auth Terms */
.auth-terms {
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.6;
}

.auth-terms a {
    color: #00a046;
    text-decoration: underline;
}

.auth-terms a:hover {
    opacity: 0.8;
}

/* Verify Step */
.verify-instruction {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.verify-instruction strong {
    color: #333;
    font-weight: 600;
}

.resend-code {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.resend-code span {
    margin-right: 5px;
}

/* Success Step */
.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #00a046;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #fff;
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#auth-step-success h3 {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

#auth-step-success p {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 576px) {
    .yorkup-modal-content {
        width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
    }
    
    .yorkup-auth-container {
        padding: 30px 20px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .auth-method-tabs {
        flex-direction: column;
    }
}
