/* css/estilo.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e2a2e 0%, #2d3e40 100%);
    min-height: 100vh;
    color: #f0f0f0;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 20px;
}

/* ============================================
   HEADER
   ============================================ */
.main-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #f4c542;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5em;
    font-weight: bold;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s;
}

.main-nav a:hover {
    background: rgba(244, 197, 66, 0.2);
    color: #f4c542;
}

.user-area {
    display: flex;
    align-items: center;
}

.user-dropdown {
    position: relative;
    cursor: pointer;
}

.user-name {
    background: rgba(244, 197, 66, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    color: #f4c542;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #2d3e40;
    min-width: 180px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
}

.user-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: white;
    border-bottom: 1px solid #3a5356;
}

.dropdown-content a:hover {
    background: #3a5356;
    color: #f4c542;
}

.btn-login-header {
    background: #f4c542;
    color: #1e2a2e;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
}

/* ============================================
   LANDING PAGE
   ============================================ */
.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hero-section {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 3em;
    color: #f4c542;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.auth-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.auth-box {
    background: rgba(45, 62, 64, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.auth-box h2 {
    margin-bottom: 20px;
    color: #f4c542;
    text-align: center;
}

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

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #3a5356;
    color: white;
    font-size: 16px;
}

.form-group input::placeholder {
    color: #a0c4c8;
}

/* ============================================
   BOTONES
   ============================================ */
.btn-primary, .btn-success, .btn-secondary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-primary {
    background: #f4c542;
    color: #1e2a2e;
}

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-secondary {
    background: #2196f3;
    color: white;
}

.btn-primary:hover, .btn-success:hover, .btn-secondary:hover {
    transform: translateY(-2px);
}

.btn-logout {
    background: #f44336;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
}

/* ============================================
   ALERTAS Y MENSAJES
   ============================================ */
.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.alert.error {
    background: #f44336;
    color: white;
}

.alert.success {
    background: #4caf50;
    color: white;
}

.flash-message {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    z-index: 1100;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.flash-message.success {
    background: #4caf50;
}

.flash-message.error {
    background: #f44336;
}

.flash-message.info {
    background: #2196f3;
}

.close-flash {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    margin-bottom: 30px;
}

.user-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(45, 62, 64, 0.95);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.stat-card h3 {
    color: #f4c542;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 2em;
    font-weight: bold;
}

.create-sala {
    background: rgba(45, 62, 64, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.create-sala form {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.create-sala input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #3a5356;
    color: white;
}

.salas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.sala-card {
    background: rgba(45, 62, 64, 0.95);
    padding: 20px;
    border-radius: 15px;
    border-top: 4px solid #f4c542;
    transition: transform 0.2s;
}

.sala-card:hover {
    transform: translateY(-5px);
}

.sala-card h3 {
    margin-bottom: 10px;
    color: #f4c542;
}

.sala-card p {
    margin-bottom: 15px;
    color: #a0c4c8;
}

.sala-logo-small {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: #1a1a2e;
    color: #a0c4c8;
    margin-top: 40px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h4 {
    color: #f4c542;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #a0c4c8;
    text-decoration: none;
}

.footer-section a:hover {
    color: #f4c542;
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #2d3e40;
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features-section {
    background: rgba(0,0,0,0.3);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
}

.features-section h2 {
    color: #f4c542;
    margin-bottom: 30px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.feature-card {
    background: rgba(45, 62, 64, 0.5);
    padding: 25px;
    border-radius: 15px;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: #f4c542;
    margin-bottom: 10px;
}

/* ============================================
   INFO SECTION
   ============================================ */
.info-section {
    background: rgba(0,0,0,0.3);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
}

.info-section h3 {
    color: #f4c542;
    margin: 15px 0 10px;
}

/* ============================================
   WELCOME SECTION
   ============================================ */
.welcome-section {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-section h1 {
    color: #f4c542;
    margin-bottom: 10px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 40px;
    background: rgba(45, 62, 64, 0.5);
    border-radius: 15px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .auth-container {
        grid-template-columns: 1fr;
    }
    
    .create-sala form {
        flex-direction: column;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .flash-message {
        left: 20px;
        right: 20px;
        top: auto;
        bottom: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-section h1 {
        font-size: 2em;
    }
}