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

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

body{
    background-color: #fff7ed;
    background: linear-gradient(to right, #fff7ed, #fed7aa);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
}

.container{
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(249, 115, 22, 0.35);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
    height: auto;
}

.container p{
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 20px 0;
}

.container span{
    font-size: 12px;
}

.container a{
    color: #333;
    font-size: 13px;
    text-decoration: none;
    margin: 15px 0 10px;
}

.container button{
    background-color: #f97316;
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.container button:hover{
    background-color: #ea580c;
    transform: translateY(-2px);
}

.container button.hidden{
    background-color: transparent;
    border-color: #fff;
}

.container form{
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px 40px;
    height: 100%;
    min-height: 480px;
}

.container input{
    background-color: #fed7aa;
    border: none;
    margin: 6px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
    transition: all 0.3s ease;
}

.container input:focus{
    background-color: #fdba74;
    box-shadow: 0 0 0 2px #f97316;
}

.form-container{
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in{
    left: 0;
    width: 50%;
    z-index: 2;
}

.container.active .sign-in{
    transform: translateX(100%);
}

.sign-up{
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.active .sign-up{
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: move 0.6s;
}

@keyframes move{
    0%, 49.99%{
        opacity: 0;
        z-index: 1;
    }
    50%, 100%{
        opacity: 1;
        z-index: 5;
    }
}

.social-icons{
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn{
    border: 1px solid #fed7aa;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    transition: all 0.3s ease;
    background: #fff;
    color: #333;
    font-size: 18px;
    cursor: pointer;
}

.social-btn:hover{
    border-color: #f97316;
    background-color: #fff7ed;
    transform: translateY(-2px);
}

.social-btn.google{
    color: #db4437;
}

.social-btn.apple{
    color: #000;
}

.social-btn.phone{
    color: #10b981;
}

.toggle-container{
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    border-radius: 150px 0 0 100px;
    z-index: 1000;
}

.container.active .toggle-container{
    transform: translateX(-100%);
    border-radius: 0 150px 100px 0;
}

.toggle{
    background-color: #f97316;
    height: 100%;
    background: linear-gradient(to right, #fb923c, #f97316);
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.container.active .toggle{
    transform: translateX(50%);
}

.toggle-panel{
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 30px;
    text-align: center;
    top: 0;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.toggle-left{
    transform: translateX(-200%);
}

.container.active .toggle-left{
    transform: translateX(0);
}

.toggle-right{
    right: 0;
    transform: translateX(0);
}

.container.active .toggle-right{
    transform: translateX(200%);
}

.social-btn.apple:hover{
    background-color: #fff7ed;
    color: #000;
}

/* Phone modal styles */
.phone-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

/* Password reset modal inherits phone modal styles */
#passwordResetModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.phone-modal-content {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 50%, #ffffff 100%);
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
    border: 2px solid rgba(251, 146, 60, 0.3);
}

.phone-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid rgba(251, 146, 60, 0.2);
    background: rgba(249, 115, 22, 0.1);
}

.phone-modal-header h2 {
    color: #ea580c;
    margin: 0;
    font-weight: 700;
}

.close-phone-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #ea580c;
    font-weight: bold;
}

.phone-modal-body {
    padding: 30px;
}

.phone-step h3 {
    color: #ea580c;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.phone-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.country-select {
    flex: 0 0 140px;
    padding: 12px;
    border: 2px solid rgba(251, 146, 60, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-weight: 500;
}

.phone-input, .otp-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(251, 146, 60, 0.3);
    border-radius: 10px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.3s ease;
}

.phone-input:focus, .otp-input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.otp-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 5px;
    font-weight: bold;
    margin-bottom: 20px;
}

.phone-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.phone-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(249, 115, 22, 0.3);
}

.phone-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.phone-btn-secondary {
    width: 100%;
    padding: 10px 20px;
    background: transparent;
    color: #ea580c;
    border: 2px solid #ea580c;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.phone-btn-secondary:hover {
    background: #ea580c;
    color: white;
}

.social-btn.phone:hover{
    background-color: #fff7ed;
    color: #10b981;
}

#recaptcha-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

#sentPhoneNumber {
    color: #ea580c;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 95%;
        min-height: 450px;
        border-radius: 20px;
        margin: 10px;
    }

    .container form {
        padding: 15px 25px;
        min-height: 450px;
    }

    .container button {
        padding: 8px 35px;
        font-size: 11px;
    }

    .container input {
        padding: 8px 12px;
        font-size: 12px;
        margin: 4px 0;
    }

    .social-icons {
        margin: 15px 0;
        gap: 10px;
    }

    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .toggle-panel {
        padding: 0 20px;
    }

    .toggle-panel h1 {
        font-size: 1.5rem;
    }

    .toggle-panel p {
        font-size: 12px;
    }

    .phone-modal-content {
        width: 95%;
        margin: 20px;
    }

    .phone-modal-body {
        padding: 20px;
    }

    .phone-input-group {
        flex-direction: column;
        gap: 8px;
    }

    .country-select {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        width: 98%;
        min-height: 400px;
        border-radius: 15px;
    }

    .container form {
        padding: 10px 20px;
        min-height: 400px;
    }

    .container h1 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .container button {
        padding: 8px 30px;
        font-size: 10px;
    }

    .container input {
        padding: 6px 10px;
        font-size: 11px;
    }

    .social-icons {
        margin: 10px 0;
        gap: 8px;
    }

    .social-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .container span {
        font-size: 10px;
        margin: 8px 0;
    }

    .container a {
        font-size: 11px;
        margin: 10px 0 8px;
    }

    .toggle-panel {
        padding: 0 15px;
    }

    .toggle-panel h1 {
        font-size: 1.2rem;
    }

    .toggle-panel p {
        font-size: 11px;
        margin: 15px 0;
    }

    .phone-modal-content {
        width: 98%;
        margin: 10px;
        border-radius: 15px;
    }

    .phone-modal-header {
        padding: 15px 20px;
    }

    .phone-modal-body {
        padding: 15px;
    }
}

/* Additional responsive improvements */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        width: 90%;
    }
}

.message.success {
        background-color: #d4edda;
        color: #155724;
        border-color: #c3e6cb;
    }

    .message.info {
        background-color: #d1ecf1;
        color: #0c5460;
        border-color: #bee5eb;
    }

    /* Highlight important messages with warning emoji */
    .auth-message:contains("⚠️") {
        border-left: 4px solid #f59e0b;
        font-weight: 600;
    }