/* Global Variables */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --background-color: #f8fafc;
    --text-color: #333;

    /* High contrast variables */
    --text-on-dark: #f8fafc;
    /* Slate-50: Bright white-ish for dark backgrounds */
    --text-muted-on-dark: #cbd5e1;
    /* Slate-300: Lighter grey for dark backgrounds */
    --text-on-light: #1e293b;
    /* Slate-800: Dark color for light backgrounds */
    --text-muted-on-light: #475569;
    /* Slate-600: Muted dark for light backgrounds */
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Header y navegación */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Notifications Dropdown */
.notifications-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-badge {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.badge-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ef4444;
    color: white !important;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    min-width: 280px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    border-radius: 12px;
    margin-top: 10px;
    border: 1px solid #e2e8f0;
}

/* Puente invisible para mantener el hover entre el badge y el menú */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}

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

.dropdown-header {
    background-color: #f8fafc;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-bottom: 1px solid #e2e8f0;
}

.dropdown-content a {
    color: #1e293b !important;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background-color: #f8fafc;
    opacity: 1 !important;
    color: #6366f1 !important;
}

.item-count {
    background-color: #ede9fe;
    color: #7c3aed;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #667eea;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.feature h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

/* Dynamic content section */
.dynamic-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dynamic-content h2 {
    margin-bottom: 1rem;
    color: #333;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* HTMX indicator */
.htmx-indicator {
    display: none;
    margin-left: 1rem;
    color: #667eea;
}

.htmx-request .htmx-indicator {
    display: inline;
}

#users-list {
    margin-top: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 5px;
}

/* About page */
.about {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.about h1 {
    color: #667eea;
    margin-bottom: 1rem;
}

.about h2 {
    color: #333;
    margin: 1.5rem 0 0.5rem;
}

.about ul {
    list-style-position: inside;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    margin-top: 2rem;
}

.footer-link {
    color: #667eea;
    text-decoration: none;
    margin-left: 0.75rem;
}

.footer-link:hover {
    text-decoration: underline;
}