/* Estilos globais para o tema FXAPP */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&display=swap');

* {
    outline-width: 0;
    font-family: 'Montserrat', sans-serif !important;
    box-sizing: border-box; /* Adicionado para melhor controle de layout */
}

body {
    background-color: #0d1117; /* Fundo escuro como o logo */
    color: #e6f0ff; /* Cor do texto clara */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center; /* Centraliza verticalmente o container */
    align-items: center; /* Centraliza horizontalmente o container */
    background-image: radial-gradient(circle at center, rgba(0, 191, 255, 0.1) 0%, transparent 70%);
    background-size: 200% 200%;
    animation: gradientAnimation 15s ease infinite;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Estilo para containers de páginas simples (como login.php e aplicativo.php) */
.container {
    background-color: rgba(18, 24, 31, 0.9); /* Um pouco mais claro que o body */
    border: 1px solid rgba(0, 191, 255, 0.3); /* Borda azul clara */
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.4);
    width: 90%;
    max-width: 980px; /* AJUSTADO: Aumentado para acomodar os cards lado a lado confortavelmente */
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 20px auto; /* Centraliza o container */
}

.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, rgba(0, 191, 255, 0.1), rgba(0, 191, 255, 0.0) 50%, rgba(0, 191, 255, 0.1));
    transform: rotate(45deg);
    z-index: 0;
    animation: rotateBackground 10s linear infinite;
    opacity: 0.2;
}

@keyframes rotateBackground {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.container * {
    position: relative; /* Para garantir que o conteúdo fique acima do pseudo-elemento */
    z-index: 1;
}

h1, h2, h3, h5 {
    color: #00bfffff; /* Azul do logo */
    margin-bottom: 20px;
    text-shadow: 0 0 5px rgba(0, 191, 255, 0.7);
}

.logo-section {
    margin-bottom: 25px;
}

.logo-section img {
    max-width: 150px;
    height: auto;
    filter: drop-shadow(0 0 8px rgba(0, 191, 255, 0.8));
    animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
    from { filter: drop-shadow(0 0 8px rgba(0, 191, 255, 0.8)); }
    to { filter: drop-shadow(0 0 15px rgba(0, 191, 255, 1)); }
}

/* Estilos para cards e botões de contato */
.cards-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centraliza os cards quando não preenchem a linha */
    gap: 30px; /* Espaçamento entre os cards */
    margin: 50px 0;
    max-width: 100%; /* Garante que o wrapper use a largura total disponível no container */
}

.card {
    background-color: rgba(0, 191, 255, 0.08);
    border: 1px solid rgba(0, 191, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    padding: 30px;
    width: 100%; /* Padrão para telas pequenas */
    max-width: 300px; /* Reduzido para permitir 3 cards na linha */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Adicionando media query para telas maiores para 3 cards por linha */
@media (min-width: 1024px) { /* Exemplo: telas maiores que 1024px */
    .cards-wrapper {
        justify-content: space-between; /* Distribui os cards na linha */
    }
    .card {
        flex: 1 1 calc(33.33% - 20px); /* Aproximadamente 3 cards por linha com gap */
        max-width: calc(33.33% - 20px); /* Ajusta a largura para 3 cards menos o gap */
        /* calc(100% / 3 - gap_total_entre_cards) */
    }
}

/* Media query para 2 cards por linha em telas intermediárias */
@media (min-width: 768px) and (max-width: 1023px) {
    .cards-wrapper {
        justify-content: space-around;
    }
    .card {
        flex: 1 1 calc(50% - 20px); /* Aproximadamente 2 cards por linha com gap */
        max-width: calc(50% - 20px);
    }
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 191, 255, 0.6);
}

.card h2 {
    color: #00bfffff; /* Azul do logo para os títulos dos cards */
    margin-bottom: 20px;
    font-size: 1.8em;
    text-shadow: 0 0 5px rgba(0, 191, 255, 0.7);
}

.card p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 20px;
}

.price {
    font-size: 1.2em;
    font-weight: 600;
    color: #e6f0ff;
}

.price span {
    color: #00bfffff;
    font-size: 1.5em;
}

.btn-comprar {
    background-color: #00bfffff;
    color: #0d1117;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 20px;
}

.btn-comprar:hover {
    background-color: #00e0ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.5);
}

.btn-comprar:active {
    transform: translateY(0);
    box-shadow: none;
}

.contact-buttons {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.contact-button {
    background-color: #00bfffff; /* Azul do logo para os botões */
    color: #0d1117;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-button:hover {
    background-color: #00e0ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.5);
}

.contact-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.contact-button i {
    margin-right: 10px;
}

/* Estilos para o painel de administração */
.admin-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1200px;
    margin: 20px;
    min-height: 80vh;
}

.sidebar {
    width: 250px;
    background-color: rgba(18, 24, 31, 0.9);
    border: 1px solid rgba(0, 191, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-right: 20px;
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.4);
    display: flex;
    flex-direction: column;
}

.sidebar a {
    color: #e6f0ff;
    text-decoration: none;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 600;
    display: block;
    text-align: left;
    list-style-type: none;
}

.sidebar a:hover {
    background-color: rgba(0, 191, 255, 0.1);
    color: #00e0ff;
}

.main-content {
    flex-grow: 1;
    background-color: rgba(18, 24, 31, 0.9);
    border: 1px solid rgba(0, 191, 255, 0.3);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.4);
}

.logout-btn {
    margin-top: auto;
    background-color: #f44336;
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #e53935;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid rgba(0, 191, 255, 0.3);
    background-color: rgba(0, 191, 255, 0.05);
    color: #e6f0ff;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: #00bfffff;
    box-shadow: 0 0 8px rgba(0, 191, 255, 0.6);
}

.btn-submit {
    background-color: #00bfffff;
    color: #0d1117;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.btn-submit:hover {
    background-color: #00e0ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.5);
}

.table-admin {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: rgba(0, 191, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.table-admin th, .table-admin td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 191, 255, 0.2);
}

.table-admin th {
    background-color: rgba(0, 191, 255, 0.15);
    color: #00bfffff;
}

.table-admin tr:hover {
    background-color: rgba(0, 191, 255, 0.05);
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em; /* Fonte menor */
    padding: 6px 10px; /* Preenchimento menor */
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.btn-edit {
    background-color: #ffc107;
}

.btn-delete {
    background-color: #f44336;
}

.btn-toggle {
    background-color: #4caf50;
}

/* Responsividade */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
    .main-content {
        width: 100%;
    }
}