/* ==============================================
   OhWriting - Sistema de Escritura Creativa
   Diseñado para Vane ✨
   ============================================== */

:root {
    /* Gradients ya no se usan, se reemplazan por variables de tema */
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Dark Theme */
[data-bs-theme="dark"] {
    --bs-body-bg: #0f172a;
    --bs-body-color: #e2e8f0;
    --bs-secondary-bg: #1e293b;
    --bs-border-color: #334155;
}

body {
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Background controlado por themes.css */
}

/* ==============================================
   Cards & Containers
   ============================================== */

.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    /* Background controlado por themes.css */
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.stat-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px var(--shadow-color);
}

.proyecto-card,
.entidad-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.proyecto-card:hover,
.entidad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* ==============================================
   Buttons
   ============================================== */

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ==============================================
   Navigation
   ============================================== */

.navbar {
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-link {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 5px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ==============================================
   Forms
   ============================================== */

.form-control,
.form-select {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    /* Background y border controlados por themes.css */
    box-shadow: 0 0 0 3px var(--shadow-color);
}

/* ==============================================
   Badges & Tags
   ============================================== */

.badge {
    padding: 0.4em 0.8em;
    border-radius: 20px;
    font-weight: 500;
}

/* ==============================================
   Alerts
   ============================================== */

.alert {
    border: none;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border-left: 4px solid #3b82f6;
}

/* ==============================================
   List Groups
   ============================================== */

.list-group-item {
    /* Background controlado por themes.css */
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
    transition: all 0.3s ease;
}

.list-group-item:hover {
    /* Background controlado por themes.css */
    transform: translateX(5px);
}

.list-group-item-action:hover {
    color: var(--primary-color);
}

/* ==============================================
   Animations
   ============================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.list-group-item {
    animation: fadeIn 0.5s ease;
}

/* ==============================================
   Scrollbar
   ============================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ==============================================
   Breadcrumb
   ============================================== */

.breadcrumb {
    background: transparent;
    padding: 1rem 0;
}

.breadcrumb-item a {
    color: var(--primary-light);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

/* ==============================================
   Modals
   ============================================== */

.modal-content {
    /* Background controlado por themes.css */
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
}

.modal-header {
    border-bottom-color: var(--bs-border-color);
}

.modal-footer {
    border-top-color: var(--bs-border-color);
}

/* ==============================================
   Responsive
   ============================================== */

@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .proyecto-card,
    .entidad-card {
        margin-bottom: 1rem;
    }
}

/* ==============================================
   Utilities
   ============================================== */

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--primary-gradient);
}

.bg-gradient-secondary {
    background: var(--secondary-gradient);
}

.shadow-soft {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ==============================================
   Login & Auth Pages
   ============================================== */

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-card {
    border: 1px solid rgba(102, 126, 234, 0.3);
}

/* ==============================================
   Botón Flotante de Sugerencias
   ============================================== */

.suggestion-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 1000;
    animation: pulse-subtle 3s ease-in-out infinite;
}

.suggestion-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.suggestion-float-btn i {
    animation: swing 2s ease-in-out infinite;
}

@keyframes pulse-subtle {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.7);
    }
}

@keyframes swing {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

/* ==============================================
   Contenido HTML Renderizado (Preview)
   ============================================== */

.contenido-preview {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #cbd5e1;
}

.contenido-preview p {
    margin-bottom: 0.8em;
}

.contenido-preview h1 {
    font-size: 1.3em;
    font-weight: 700;
    margin: 0.5em 0 0.3em;
    color: #f1f5f9;
}

.contenido-preview h2 {
    font-size: 1.15em;
    font-weight: 600;
    margin: 0.4em 0 0.2em;
    color: #e2e8f0;
}

.contenido-preview h3 {
    font-size: 1.05em;
    font-weight: 600;
    margin: 0.3em 0 0.2em;
    color: #e2e8f0;
}

.contenido-preview strong {
    color: #a78bfa;
    font-weight: 600;
}

.contenido-preview em {
    font-style: italic;
    color: #93c5fd;
}

.contenido-preview blockquote {
    border-left: 3px solid #8b5cf6;
    padding-left: 1em;
    margin: 0.8em 0;
    font-style: italic;
    color: #a5b4fc;
}

.contenido-preview ul, .contenido-preview ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.contenido-preview li {
    margin-bottom: 0.3em;
}
