/* === VARIABLES === */
:root {
    --color-bg: #0a0a23;
    --color-text: #e0e0ff;
    --color-accent: #00f5ff;
    --color-highlight: #ff00ff;
    --font-tech: 'Orbitron', sans-serif;
}

/* === GLOBAL === */
body {
    font-family: var(--font-tech);
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

a {
    color: var(--color-highlight);
    text-decoration: none;
}

a:hover {
    color: var(--color-accent);
}

/* === HEADER === */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111133;
    padding: 1rem 2rem;
    border-bottom: 2px solid var(--color-accent);
}

nav a {
    margin: 0 1rem;
    font-weight: bold;
}

#theme-toggle {
    background: none;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
}

/* === HERO === */
.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #0a0a23, #1a1a3f);
    border-bottom: 2px solid var(--color-accent);
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: var(--color-highlight);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.cta-button:hover {
    background-color: var(--color-accent);
}

/* === ARTICLES === */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.article-card {
    background: #111133;
    padding: 1rem;
    border: 1px solid var(--color-accent);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.article-card:hover {
    transform: scale(1.05);
}

.article-card h3 a {
    font-size: 1.2rem;
    font-weight: bold;
}

.article-card p {
    margin: 0.5rem 0;
}

.date {
    font-size: 0.9rem;
    color: #aaa;
}

.empty-message {
    text-align: center;
    font-style: italic;
    color: #888;
}

/* === FOOTER === */
footer {
    text-align: center;
    padding: 1rem;
    background: #111133;
    border-top: 2px solid var(--color-accent);
    font-size: 0.9rem;
}

/* === DARK MODE === */
.dark-mode {
    --color-bg: #000014;
    --color-text: #c0c0ff;
    --color-accent: #00ffff;
    --color-highlight: #ff00cc;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        margin-top: 1rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .cta-button {
        font-size: 1rem;
    }
}



/* === ARTICLE DETAIL === */
.article-full {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #111133;
    border: 1px solid var(--color-accent);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
    animation: fadeIn 0.6s ease-in-out;
}

.article-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--color-highlight);
}

.article-date {
    font-size: 0.9rem;
    color: #aaa;
    display: block;
    margin-bottom: 1.5rem;
}

.article-content {
    line-height: 1.7;
    font-size: 1.1rem;
    color: var(--color-text);
}

.article-content p {
    margin-bottom: 1rem;
}

.article-footer {
    margin-top: 2rem;
    text-align: right;
}

.back-button {
    background-color: var(--color-accent);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s ease;
}

.back-button:hover {
    background-color: var(--color-highlight);
}

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


/* === CATEGORY HERO === */
.category-hero {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #0a0a23, #1a1a3f);
    border-bottom: 2px solid var(--color-accent);
    animation: fadeIn 0.6s ease-in-out;
}

.category-hero h1 {
    font-size: 2rem;
    color: var(--color-highlight);
    margin-bottom: 1rem;
}

.category-hero p {
    font-size: 1.2rem;
    color: var(--color-text);
}

/* === CATEGORY INDEX === */
.categories-list {
    padding: 2rem;
    text-align: center;
}

.category-grid {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.category-card {
    display: block;
    background: #111133;
    padding: 1rem;
    border: 1px solid var(--color-accent);
    border-radius: 8px;
    color: var(--color-highlight);
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease;
}

.category-card:hover {
    transform: scale(1.05);
    background: var(--color-accent);
    color: #000;
}


/* === PRIVACY === */
.privacy-section {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: #111133;
    border: 1px solid var(--color-accent);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
    animation: fadeIn 0.6s ease-in-out;
}

.privacy-section h1 {
    color: var(--color-highlight);
    margin-bottom: 1rem;
}

.privacy-section h2 {
    color: var(--color-accent);
    margin-top: 1.5rem;
}

/* === CONTACT === */
.contact-section {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #111133;
    border: 1px solid var(--color-accent);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.2);
    animation: fadeIn 0.6s ease-in-out;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form label {
    font-weight: bold;
    color: var(--color-accent);
}

.contact-form input,
.contact-form textarea {
    padding: 0.8rem;
    border: 1px solid var(--color-accent);
    border-radius: 6px;
    background: #0a0a23;
    color: var(--color-text);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-highlight);
    box-shadow: 0 0 10px var(--color-highlight);
}


/* === FOOTER SOCIAL === */
footer {
    text-align: center;
    padding: 1.5rem;
    background: #111133;
    border-top: 2px solid var(--color-accent);
    font-size: 0.9rem;
    position: relative;
}

.social-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-icon {
    color: var(--color-highlight);
    font-weight: bold;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-accent);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--color-accent);
    color: #000;
    box-shadow: 0 0 15px var(--color-accent);
}


/* === HEADER === */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111133;
    padding: 1rem 2rem;
    border-bottom: 2px solid var(--color-accent);
}

nav a {
    margin: 0 1rem;
    font-weight: bold;
}

#theme-toggle {
    background: none;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background: var(--color-accent);
    color: #000;
}


/* === LIGHT MODE FUTURISTA === */
.light-mode {
    --color-bg: #f5f5f5;
    --color-text: #222;
    --color-accent: #007bff;
    --color-highlight: #ff00cc;
}

/* Ajustes específicos para light mode */
.light-mode body {
    background-color: var(--color-bg);
    color: var(--color-text);
}

.light-mode header,
.light-mode footer,
.light-mode .article-card,
.light-mode .category-card,
.light-mode .privacy-section,
.light-mode .contact-section {
    background: #fff;
    border-color: var(--color-accent);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.2);
}

.light-mode h1,
.light-mode h2,
.light-mode h3 {
    color: var(--color-accent);
}

.light-mode a {
    color: var(--color-highlight);
}

.light-mode a:hover {
    color: var(--color-accent);
}

.light-mode .cta-button {
    background-color: var(--color-accent);
    color: #fff;
}

.light-mode .cta-button:hover {
    background-color: var(--color-highlight);
    color: #fff;
}


/* === TRANSICIÓN ENTRE TEMAS === */
body {
    transition: background-color 0.6s ease, color 0.6s ease;
}

header, footer, .article-card, .category-card,
.privacy-section, .contact-section {
    transition: background-color 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease, color 0.6s ease;
}

.cta-button, .back-button, .social-icon {
    transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}


#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    top: 0;
    left: 0;
    z-index: -1; /* detrás del contenido */
}

