/* 
 * CodeBini API - Unified Styles
 * Archivo CSS unificado para todas las páginas
 */

/* ===================================
   RESET Y CONFIGURACIÓN BASE
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #352b33 0%, #ff5c00 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===================================
   CONTENEDOR PRINCIPAL
   =================================== */
.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 60px 40px;
    width: 100%;
    text-align: center;
}

/* Tamaño específico para página principal */
.container.main {
    max-width: 800px;
}

/* Tamaño específico para páginas de error */
.container.error {
    max-width: 700px;
}

/* ===================================
   LOGO
   =================================== */
.logo-container {
    margin-bottom: 30px;
}

.logo {
    max-height: 80px;
    max-width: 100%;
    width: auto;
    height: auto;
    margin-bottom: 20px;
    object-fit: contain;
}

/* ===================================
   STATUS BADGE (PÁGINA PRINCIPAL)
   =================================== */
.status-badge {
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
}

.status-online {
    background: #ff5c00;
    box-shadow: 0 4px 15px rgba(255, 92, 0, 0.3);
}

.status-offline {
    background: #dc2626;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ===================================
   TIPOGRAFÍA
   =================================== */
/* Título principal - Página de inicio */
h1.main-title {
    font-size: 48px;
    font-weight: 700;
    color: #352b33;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #352b33, #ff5c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Título de error - Páginas de error */
h1.error-title {
    font-size: 24px;
    font-weight: 600;
    color: #352b33;
    margin-bottom: 15px;
}

.subtitle {
    font-size: 20px;
    color: #352b33;
    margin-bottom: 40px;
    font-weight: 500;
    opacity: 0.8;
}

/* Subtitle específico para errores */
.subtitle.error {
    font-size: 18px;
    margin-bottom: 30px;
}

/* ===================================
   CÓDIGOS DE ERROR
   =================================== */
.error-code {
    font-size: 120px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1;
}

.error-404 {
    background: linear-gradient(135deg, #352b33, #ff5c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-500 {
    background: linear-gradient(135deg, #dc2626, #ff5c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   TARJETAS DE INFORMACIÓN
   =================================== */
.api-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    border-left: 4px solid #ff5c00;
    box-shadow: 0 4px 20px rgba(53, 43, 51, 0.1);
}

.api-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #352b33;
    margin-bottom: 15px;
}

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

.info-item {
    text-align: left;
}

.info-label {
    font-size: 14px;
    font-weight: 500;
    color: #ff5c00;
    margin-bottom: 5px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: #352b33;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* ===================================
   TARJETAS DE ERROR
   =================================== */
.path-info, .error-info {
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 40px;
    border-left: 4px solid #ff5c00;
}

.path-info {
    background: #f8f9fa;
}

.error-info {
    background: #fff5f5;
    border-left-color: #dc2626;
}

.path-label, .error-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.path-label {
    color: #ff5c00;
}

.error-label {
    color: #dc2626;
}

.path-value, .error-message {
    font-size: 16px;
    color: #352b33;
    font-family: 'Monaco', 'Menlo', monospace;
    word-break: break-all;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.error-message {
    border-color: #fee2e2;
}

/* ===================================
   SECCIONES DE ENLACES/TARJETAS
   =================================== */
.links-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.buttons-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.link-card {
    background: white;
    border: 2px solid #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(53, 43, 51, 0.08);
}

/* Alineación específica para páginas de error */
.buttons-section .link-card {
    text-align: center;
}

.link-card:hover {
    border-color: #ff5c00;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 92, 0, 0.15);
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #e5e7eb;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.link-card:hover::before {
    transform: scaleX(1);
}

.link-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.link-title {
    font-size: 16px;
    font-weight: 600;
    color: #352b33;
    margin-bottom: 8px;
}

.link-description {
    font-size: 14px;
    color: #352b33;
    opacity: 0.7;
    line-height: 1.5;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #f8f9fa;
    color: #352b33;
    opacity: 0.6;
    font-size: 14px;
}

/* Tamaño específico para páginas de error */
.footer.error {
    font-size: 12px;
}

/* ===================================
   TARJETA IP DESTACADA
   =================================== */
.ip-highlight {
    background: #352b33;
    border-radius: 16px;
    padding: 25px;
    margin: 30px auto;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(255, 92, 0, 0.3);
    border: 1px solid #ff5c00;
}

.ip-highlight h4 {
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.ip-address {
    color: white;
    font-size: 28px;
    font-weight: 700;
    font-family: 'Monaco', 'Menlo', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
    word-break: break-all;
}

.ip-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 400;
}

/* ===================================
   ESTADÍSTICAS DE VISITAS
   =================================== */
.visit-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.visit-stats .separator {
    width: 1px;
    height: 30px;
    background: rgba(255, 92, 0, 0.2);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .container {
        padding: 40px 20px;
    }
    
    .logo {
        max-height: 60px;
        max-width: 90%;
    }
    
    h1.main-title {
        font-size: 36px;
    }
    
    h1.error-title {
        font-size: 22px;
    }
    
    .subtitle {
        font-size: 18px;
    }
    
    .subtitle.error {
        font-size: 16px;
    }
    
    .error-code {
        font-size: 80px;
    }
    
    .links-section {
        grid-template-columns: 1fr;
    }
    
    .buttons-section {
        grid-template-columns: 1fr;
    }
    
    .ip-highlight {
        margin: 20px auto;
        padding: 20px;
        max-width: 350px;
    }
    
    .ip-address {
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .visit-stats {
        gap: 20px !important;
    }
    
    .visit-stats .separator {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .logo {
        max-height: 50px;
        max-width: 85%;
    }
    
    h1.main-title {
        font-size: 28px;
    }
    
    h1.error-title {
        font-size: 20px;
    }
    
    .error-code {
        font-size: 60px;
    }
    
    .ip-highlight {
        margin: 15px auto;
        padding: 18px;
        max-width: 300px;
    }
    
    .ip-address {
        font-size: 20px;
    }
    
    .ip-highlight h4 {
        font-size: 12px;
    }
}