/* Estilos para a página de login melhorada */

.login-page {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Imagem de fundo */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Fallback padrão - será sobrescrito pelo JavaScript se WebP for suportado */
    background-image: url('../img/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.login-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Layout principal */
.login-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding-top: 10px;
    gap: 20px;
    position: relative;
    z-index: 1;
}

/* Slogan principal */
.main-slogan {
    text-align: center;
    margin-bottom: 20px;
    z-index: 2;
}

.main-slogan h2 {
    font-size: 2.2em;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin: 0;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Container dos cards e login */
.login-content {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Containers dos cards laterais */
.left-side-cards,
.right-side-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 220px;
    flex-shrink: 0;
}

/* Cards laterais */
.side-card {
    width: 200px;
    height: 280px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.side-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.side-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.construction-card::before {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.research-card::before {
    background: linear-gradient(90deg, #9C27B0, #E91E63);
}

.combat-card::before {
    background: linear-gradient(90deg, #F44336, #FF5722);
}

.navigation-card::before {
    background: linear-gradient(90deg, #2196F3, #03A9F4);
}

.card-content {
    text-align: center;
    padding: 20px 15px;
}

.card-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    color: white;
    position: relative;
}

.construction-card .card-icon {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.research-card .card-icon {
    background: linear-gradient(135deg, #9C27B0, #E91E63);
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.3);
}

.combat-card .card-icon {
    background: linear-gradient(135deg, #F44336, #FF5722);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

.navigation-card .card-icon {
    background: linear-gradient(135deg, #2196F3, #03A9F4);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

.card-content h3 {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.card-content p {
    font-size: 0.85em;
    line-height: 1.4;
    color: #7f8c8d;
    margin: 0;
}

/* Card central de login */
.login-container {
    width: 400px;
    min-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0px 35px 35px 35px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFD700, #FFA500);
}

/* Header do login */
.auth-header {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 10px;
}

.logo-container {
    margin-bottom: 5px;
}

.game-logo-img {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.game-logo-img:hover {
    transform: scale(1.05);
}

.game-logo p {
    font-size: 1.1em;
    color: #7f8c8d;
    margin: 0 0 30px 0;
    font-style: italic;
}

/* Tabs */
.auth-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 30px;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button.active {
    background: white;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Formulários */
.auth-form {
    display: none;
}

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

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

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

/* Botões */
.btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Alertas */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #363;
    border: 1px solid #cfc;
}

/* Responsividade */
@media (max-width: 1200px) {
    .main-slogan h2 {
        font-size: 1.8em;
    }
    
    .login-content {
        flex-direction: column;
        gap: 25px;
        align-items: center;
    }
    
    .left-side-cards,
    .right-side-cards {
        flex-direction: row;
        gap: 15px;
        justify-content: center;
        width: auto;
    }
    
    .side-card {
        width: 180px;
        height: 160px;
    }
    
    .card-content {
        padding: 15px 10px;
    }
    
    .card-icon {
        width: 45px;
        height: 45px;
        font-size: 1.6em;
        margin-bottom: 10px;
    }
    
    .card-content h3 {
        font-size: 1.1em;
        margin-bottom: 6px;
    }
    
    .card-content p {
        font-size: 0.8em;
    }
}

@media (max-width: 768px) {
    .login-layout {
        padding: 10px 20px 20px 20px;
        gap: 15px;
        min-height: 80vh;
        padding-top: 80px;
    }
    
    .main-slogan h2 {
        font-size: 1.4em;
    }
    
    .login-content {
        gap: 20px;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .login-container {
        width: 95%;
        max-width: 400px;
        min-width: auto;
        padding: 20px 25px;
        margin: 0 auto;
    }
    
    .left-side-cards,
    .right-side-cards {
        width: 100%;
        max-width: 400px;
        flex-direction: column;
        gap: 10px;
    }
    
    .game-logo-img {
        max-width: 150px;
    }
    
    .side-card {
        width: 100%;
        max-width: 300px;
        height: 140px;
    }
    
    .card-content {
        padding: 12px 8px;
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.4em;
        margin-bottom: 8px;
    }
    
    .card-content h3 {
        font-size: 1em;
        margin-bottom: 5px;
    }
    
    .card-content p {
        font-size: 0.75em;
    }
    
    /* Estilos específicos para o formulário de login */
    .auth-forms-container {
        width: 100%;
        padding: 0 10px;
    }
    
    .auth-form {
        width: 100%;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .form-group input {
        width: 100%;
        padding: 12px 15px;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .btn {
        width: 100%;
        padding: 15px;
        font-size: 1.1rem;
    }
    
    .auth-tabs {
        margin-bottom: 20px;
    }
    
    .game-logo {
        margin-bottom: 10px;
    }
    
    .logo-container {
        margin-bottom: 5px;
    }
    
    .tab-button {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-layout {
        padding: 15px;
    }
    
    .login-container {
        padding: 25px 20px;
        margin: 0 10px;
    }
    
    .auth-forms-container {
        padding: 0 5px;
    }
    
    .form-group input {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 12px;
        font-size: 1rem;
    }
    
    .tab-button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .game-logo-img {
        max-width: 120px;
    }
    
    .auth-header {
        margin-bottom: 15px;
    }
    
    .game-logo {
        margin-bottom: 10px;
    }
    
    .logo-container {
        margin-bottom: 5px;
    }
}
