:root {
    --primary-color: #E74C3C;
    --secondary-color: #C0392B;
    --dark-bg: #121212;
    --card-bg: #1E1E1E;
    --text-color: #FFFFFF;
    --light-gray: #ECF0F1;
    --border-color: #333;
    --facebook-blue: #3b5998;
    --google-red: #DB4437;
    --success-green: #2ECC71;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
        url('https://images.unsplash.com/photo-1519501025274-8f4e8d024d04?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
}

.login-card {
    background-color: rgba(30, 30, 30, 0.9);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.3);
    backdrop-filter: blur(5px);
}

.logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.logo p {
    color: var(--light-gray);
    opacity: 0.8;
    font-size: 0.95rem;
    font-weight: 300;
}

.social-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.btn-social {
    padding: 0.75rem;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.btn-google {
    background-color: var(--google-red);
}

.btn-facebook {
    background-color: var(--facebook-blue);
}

.btn-social i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.divider {
    text-align: center;
    margin: 1.8rem 0;
    position: relative;
    color: var(--light-gray);
    opacity: 0.7;
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--light-gray);
    font-size: 0.9rem;
    font-weight: 400;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.3);
    background-color: rgba(255, 255, 255, 0.08);
}

.btn-action {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 0.5rem;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-action:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

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

.loading {
    display: none;
    align-items: center;  
    justify-content: center;  
    gap: 10px;  
    margin: 1.5rem 0;
}

.loading p {
    margin: 0;  
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top: 3px solid var(--primary-color);
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.message {
    text-align: center;
    margin: 1.5rem 0;
    padding: 0.8rem;
    border-radius: 6px;
    display: none;
    font-weight: 500;
}

.success-message {
    color: var(--success-green);
    background-color: rgba(46, 204, 113, 0.1);
}

.error-message {
    color: var(--primary-color);
    background-color: rgba(231, 76, 60, 0.1);
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--light-gray);
    cursor: pointer;
    opacity: 0.7;
}

.signup-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

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

.signup-link a:hover {
    text-decoration: underline;
}

.forgot-password {
    text-align: right;
    margin-top: 0.5rem;
}

.forgot-password a {
    color: var(--light-gray);
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(231, 76, 60, 0.3);
    border: 1px solid var(--primary-color);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--light-gray);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-message {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--light-gray);
}

.modal-step {
    display: none;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#step1 {
    display: block;
}

.resend-code {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--light-gray);
}

.resend-code a {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: none;
}

.resend-code a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .forgot-password a {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0.5rem;
        align-items: flex-start;
        background-attachment: fixed;
        align-items: center;
    }

    .login-card {
        width: 100%;
        max-width: 380px;
        padding: 1.2rem;
        margin: 1rem auto;
        border-radius: 10px;
    }

    .logo {
        margin-bottom: 1.5rem;
    }

    .logo h1 {
        font-size: 1.6rem;
        margin-bottom: 0.3rem;
    }

    .logo p {
        font-size: 0.8rem;
    }

    .social-buttons {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 1rem;
    }

    .divider {
        margin: 1rem 0;
        font-size: 0.8rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-label {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }

    .form-control {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .btn-action {
        padding: 0.7rem;
        font-size: 0.9rem;
        margin-top: 0.3rem;
    }

    .btn-social {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .signup-link {
        margin-top: 1rem;
        font-size: 0.8rem;
    }

    .toggle-password {
        right: 8px;
    }

    .modal-content {
        padding: 1.5rem;
        max-width: 90%;
    }

    .modal-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
  .login-card {
    max-width: 100%;
    padding: 1.5rem;
  }

  .form-control {
    font-size: 1rem;
    padding: 0.9rem 1rem;
  }

  .btn-action {
    font-size: 1rem;
    padding: 0.9rem;
  }

  .logo h1 {
    font-size: 1.6rem;
  }

  .logo p {
    font-size: 0.9rem;
  }
}


@media (max-width: 360px) {
    .login-card {
        padding: 0.8rem;
        max-width: 300px;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .logo p {
        font-size: 0.75rem;
    }

    .form-control {
        padding: 0.45rem 0.6rem;
        font-size: 0.85rem;
    }

    .btn-action {
        font-size: 0.85rem;
        padding: 0.55rem;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .login-card {
        margin: 0.5rem auto;
        max-width: 320px;
        padding: 0.8rem;
    }

    .logo {
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 0.8rem;
    }
}


@media screen and (orientation: landscape) and (max-width: 768px) {
  body::before {
    content: "Por favor, gire seu dispositivo para o modo retrato para usar o sistema";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    color: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    font-size: 1.2rem;
  }

  .login-card,
  .modal {
    display: none !important;
  }
}
