/**
 * style.css - Estilos da Aplicação de Concursos
 * Pasta: /www/antropic/css/style.css
 */

/* ========================================
   RESET E BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: #f8f9fa;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========================================
   HEADER
   ======================================== */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.logo-icon {
    font-size: 1.8rem;
}

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

.logo-text span {
    font-size: 0.7rem;
    opacity: 0.9;
}

/* Navegação Header */
.header-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
    white-space: nowrap;
    cursor: pointer;
}

.btn-back {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-login {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-register {
    background: white;
    color: #667eea;
}

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

.btn-logout {
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
}

.btn-logout:hover {
    background: rgba(192, 57, 43, 1);
    transform: translateY(-2px);
}

/* User Badge */
.user-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

/* ========================================
   QUICK NAV (Menu Rápido)
   ======================================== */
.quick-nav {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 12px 0;
}

.quick-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-nav a {
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s;
}

.quick-nav a:hover {
    background: #f0f0f0;
}

/* ========================================
   CONTENT WRAPPER
   ======================================== */
.content-wrapper {
    min-height: calc(100vh - 150px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ========================================
   FOOTER
   ======================================== */
.app-footer {
    background: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
    margin-top: 50px;
}

.app-footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ========================================
   PÁGINAS - ELEMENTOS COMUNS
   ======================================== */

/* Welcome Box */
.welcome-box {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
}

.welcome-box h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.welcome-box p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Info Box */
.info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.info-box h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.info-box a {
    color: #667eea;
    font-weight: 600;
}

.info-box a:hover {
    text-decoration: underline;
}

/* ========================================
   CONCURSOS - CARDS
   ======================================== */
.contests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.contest-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

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

.contest-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-upcoming {
    background: #fff3cd;
    color: #856404;
}

.contest-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.contest-card p {
    color: #7f8c8d;
    margin-bottom: 15px;
    line-height: 1.6;
}

.contest-info {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: #95a5a6;
}

.btn-participate {
    display: block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s;
}

.btn-participate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ========================================
   FORMULÁRIOS
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Alertas */
.alert {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

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

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

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* ========================================
   TABELAS
   ======================================== */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background: #667eea;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

table tr:hover {
    background: #f8f9fa;
}

table tr:last-child td {
    border-bottom: none;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .header-nav {
        width: 100%;
        justify-content: center;
    }
    
    .quick-nav-container {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-text span {
        display: none;
    }
    
    .welcome-box h2 {
        font-size: 1.5rem;
    }
    
    .contests-grid {
        grid-template-columns: 1fr;
    }
}