/* ===== RESET Y VARIABLES ===== */
:root {
    --primary-color: #6a11cb;
    --primary-dark: #2575fc;
    --secondary-color: #1a237e;
    --secondary-dark: #311b92;
    --accent-color: #00b894;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --background: #f5f5f5;
    --surface: #ffffff;
    --error: #ff5252;
    --warning: #ffc107;
    --success: #4CAF50;
    --info: #2196F3;
    --border: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --radius: 10px;
    --radius-sm: 5px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== HEADER GLOBAL ===== */
.global-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: white;
}

.logo i {
    font-size: 2.5em;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 50%;
}

.logo-text h1 {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.logo-text p {
    font-size: 0.9em;
    opacity: 0.8;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.gpu-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9em;
}

.donate-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    transition: var(--transition);
}

.donate-btn:hover {
    background: #00a085;
    transform: scale(1.05);
}

/* ===== NAVEGACIÓN PRINCIPAL ===== */
.main-nav {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
}

.main-nav::-webkit-scrollbar {
    height: 4px;
}

.main-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.main-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    min-width: 80px;
    white-space: nowrap;
}

.nav-link i {
    font-size: 1.2em;
}

.nav-link span {
    font-size: 0.85em;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* ===== CONTENIDO PRINCIPAL ===== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ===== FOOTER GLOBAL ===== */
.global-footer {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-logo i {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links h4 {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
}

.footer-bottom p {
    margin-bottom: 5px;
}

/* ===== ESTILOS COMUNES PARA TODAS LAS HERRAMIENTAS ===== */
.tool-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-header h1 {
    color: var(--text-primary);
    font-size: 2.5em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.tool-header p {
    color: var(--text-secondary);
    font-size: 1.1em;
    max-width: 600px;
    margin: 0 auto;
}

/* Upload Area común */
.upload-section {
    margin-bottom: 40px;
}

.upload-box {
    border: 3px dashed var(--border);
    border-radius: 15px;
    padding: 50px 20px;
    text-align: center;
    margin-bottom: 30px;
    cursor: pointer;
    transition: var(--transition);
    background: #f8f9fa;
}

.upload-box:hover {
    background: #e3f2fd;
    border-color: #0984e3;
}

.upload-box.dragover {
    background: #d0ebff;
    border-color: #1c7ed6;
}

.upload-icon {
    font-size: 60px;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.upload-box h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.upload-box p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.file-input {
    display: none;
}

.file-info {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* Controles comunes */
.controls-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 25px;
}

.control-group {
    flex: 1;
    min-width: 250px;
}

.control-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1em;
}

.control-label i {
    color: var(--primary-color);
    font-size: 1.2em;
    width: 24px;
}

.control-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 12px 20px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    min-width: 100px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95em;
}

.control-btn:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
    transform: translateY(-2px);
}

.control-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(106, 17, 203, 0.3);
}

/* Botón de procesar */
.process-btn-container {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.process-btn {
    width: auto;
    min-width: 300px;
    padding: 18px 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.25);
}

.process-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(106, 17, 203, 0.4);
}

.process-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Preview section */
.preview-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo {
        justify-content: center;
    }
    
    .main-nav {
        justify-content: flex-start;
    }
    
    .tool-container {
        padding: 15px;
    }
    
    .tool-header h1 {
        font-size: 2em;
    }
    
    .controls-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .control-group {
        min-width: 100%;
    }
    
    .process-btn {
        min-width: 100%;
        width: 100%;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===== ESTILOS ESPECÍFICOS PARA INDEX.PHP ===== */
.hero {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    border-radius: 0 0 20px 20px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.3em;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    animation: fadeInUp 1s ease;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #6a11cb;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 2em;
    color: white;
}

.service-card h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #333;
}

.service-card p {
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
}

.service-features {
    text-align: left;
    margin-bottom: 20px;
    width: 100%;
}

.service-features li {
    margin-bottom: 8px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-features i {
    color: #6a11cb;
}

.service-link {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: auto;
}

.service-link:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.3);
}

.features {
    background: #f8f9fa;
    padding: 80px 20px;
    margin-top: 40px;
    border-radius: 20px 20px 0 0;
}

.features h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 50px;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.feature-item i {
    font-size: 2.5em;
    color: #6a11cb;
    margin-bottom: 20px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5em;
    }
    
    .hero p {
        font-size: 1.1em;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}