:root {
    /* Variables Base (Default Theme) */
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --primary-gradient-start: #667eea;
    --primary-gradient-end: #764ba2;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --bg-body: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-nav: rgba(255, 255, 255, 0.95);
    --bg-card: white;
    --border-color: #e9ecef;
    --shadow-color: rgba(0, 0, 0, 0.1);

    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Tema Corporativo */
body.theme-corporate {
    --primary-color: #2c3e50;
    --primary-dark: #1a252f;
    --primary-gradient-start: #2c3e50;
    --primary-gradient-end: #34495e;
    --bg-body: #f4f6f9;
    --text-primary: #1a1a1a;
    --bg-nav: white;
    --shadow-color: rgba(44, 62, 80, 0.15);
}

/* Tema Creativo */
body.theme-creative {
    --primary-color: #ff6b6b;
    --primary-dark: #ee5253;
    --primary-gradient-start: #ff9f43;
    --primary-gradient-end: #ff6b6b;
    --bg-body: #2d3436;
    --bg-card: #353b48;
    --bg-nav: rgba(53, 59, 72, 0.95);
    --text-primary: #dfe6e9;
    --text-secondary: #b2bec3;
    --border-color: #4a5568;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--bg-body);
    min-height: 100vh;
    line-height: 1.6;
    color: var(--text-primary);
    transition: background 0.5s ease, color 0.3s ease;
}

/* Navegación */
.navbar {
    background: var(--bg-nav);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-brand:hover {
    color: var(--primary-color);
}

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

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.nav-link:hover {
    background: #f8f9fa;
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* Botón Personalizar destacado */
.nav-link.highlight {
    background: linear-gradient(45deg, var(--primary-gradient-start), var(--primary-gradient-end)) !important;
    color: white !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

/* Botón Personalizar al hacer hover */
.nav-link.highlight:hover {
    background: linear-gradient(45deg, #5a67d8, #6a3f8f) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

@keyframes pulse {
    0% {
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }

    50% {
        box-shadow: 0 2px 12px rgba(102, 126, 234, 0.5);
    }

    100% {
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }
}

.nav-dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: ' ▾';
    font-size: 0.8em;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: var(--bg-card);
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    top: 100%;
    left: 0;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.dropdown-content a {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.dropdown-content a:hover {
    background: #f8f9fa;
    color: var(--primary-color);
    border-left-color: #667eea;
    padding-left: 25px;
}

/* Contenido principal */
main {
    padding: 0;
}

/* Contenedores comunes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 20px;
}

.header {
    background: linear-gradient(45deg, var(--text-primary), var(--secondary-color));
    color: white;
    padding: 40px;
    text-align: center;
}

.header h1 {
    font-size: 3em;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95em;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: var(--success-color);
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: #c82333;
}

.btn-white {
    background: var(--bg-card);
    color: var(--primary-color);
    border: 2px solid white;
}

.btn-white:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-dark);
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: var(--bg-card);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tarjetas */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.notification-success {
    background: var(--success-color);
}

.notification-error {
    background: var(--danger-color);
}

.notification-info {
    background: #17a2b8;
}

.notification.show {
    transform: translateX(0);
}

/* Animaciones de entrada */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-top: 15px;
    }

    .nav-dropdown:hover .dropdown-content {
        position: static;
        box-shadow: none;
        background: #f8f9fa;
        margin-left: 0;
        margin-top: 5px;
        border-radius: 6px;
    }

    .header h1 {
        font-size: 2em;
    }

    .header p {
        font-size: 1em;
    }

    .container {
        margin: 10px;
        border-radius: 10px;
    }

    .header {
        padding: 30px 20px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 10px 15px;
    }

    .header {
        padding: 20px 15px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .card {
        padding: 20px 15px;
    }
}

/* Modo oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    .navbar {
        background: rgba(44, 62, 80, 0.95);
    }

    .nav-brand,
    .nav-link {
        color: white;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--primary-color);
    }

    .dropdown-content {
        background: #2c3e50;
    }

    .dropdown-content a {
        color: white;
    }

    .dropdown-content a:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}