* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --accent-primary: #fb923c;
    --accent-secondary: #ea580c;
    --border-color: rgba(148, 163, 184, 0.1);
    --hover-bg: rgba(251, 146, 60, 0.1);
    --success: #22c55e;
    --card-bg: #2b2d31;
    --card-border: #5865F2;
}

body.light-theme {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --border-color: rgba(226, 232, 240, 0.5);
    --hover-bg: rgba(251, 146, 60, 0.1);
    --card-bg: #ffffff;
    --card-border: #3b82f6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Navigation */
nav {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

body.light-theme nav {
    background: rgba(248, 250, 252, 0.95);
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-left: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #fb923c, #ea580c);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: #fb923c;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

.page-title {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fb923c 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* News Cards - Estilo Discord Embed */
#news-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-card {
    background: var(--card-bg);
    border-radius: 4px;
    overflow: hidden;
    border-left: 4px solid var(--card-border);
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.light-theme .news-card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.news-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

body.light-theme .news-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.news-card-content {
    padding: 0.75rem 1rem 1rem 0.75rem;
}

.news-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.author-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.news-timestamp {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.15rem;
}

.news-body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: start;
}

.news-text {
    min-width: 0;
}

.news-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.news-description {
    color: var(--text-secondary);
    line-height: 1.375rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.95rem;
}

.news-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.news-image {
    width: calc(100% - 1rem);
    max-height: 300px;
    border-radius: 4px;
    object-fit: cover;
    margin: 1rem 0.5rem 0 0.5rem;
    cursor: pointer;
}

.news-image:hover {
    opacity: 0.9;
}

.news-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.news-footer-text {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

/* Formateo de texto */
.spoiler {
    background-color: var(--bg-tertiary);
    color: transparent;
    border-radius: 3px;
    padding: 0 2px;
    cursor: pointer;
    transition: all 0.1s;
}

.spoiler.revealed,
.spoiler:hover {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
}

.small-text {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(251, 146, 60, 0.2);
    border-left: 4px solid #fb923c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
}

.empty-state-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.empty-state h2 {
    color: #fb923c;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-tertiary);
    font-size: 1.1rem;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 1rem;
}

.error-message h3 {
    color: #ef4444;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.error-message p {
    color: var(--text-secondary);
}

/* Footer */
footer {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    margin-top: auto;
    transition: background 0.3s ease;
}

body.light-theme footer {
    background: rgba(248, 250, 252, 0.95);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
}

.footer-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
}

.footer-center {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
}

.footer-text {
    color: #22c55e;
    font-size: 0.95rem;
}

.footer-contact {
    color: var(--text-primary);
    font-size: 0.9rem;
    text-decoration: none;
    position: relative;
    width: fit-content;
    transition: all 0.3s;
}

.footer-contact::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #fb923c, #ea580c);
    transition: width 0.3s;
}

.footer-contact:hover {
    color: #fb923c;
}

.footer-contact:hover::after {
    width: 100%;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(251, 146, 60, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.3);
    border-radius: 12px;
    transition: all 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    transform: translateY(-3px);
    background: rgba(251, 146, 60, 0.2);
    border-color: rgba(251, 146, 60, 0.5);
}

.social-icon {
    width: 28px;
    height: 28px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }
    
    .page-title h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-content {
        width: 100%;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-title h1 {
        font-size: 2rem;
    }

    .page-title p {
        font-size: 1rem;
    }

    .news-card-content {
        padding: 0.75rem;
    }

    .news-body {
        grid-template-columns: 1fr;
    }

    .news-thumbnail {
        width: 100%;
        height: auto;
        max-height: 200px;
        order: -1;
    }

    .news-title {
        font-size: 0.95rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .empty-state {
        padding: 3rem 1.5rem;
    }

    .empty-state-icon {
        font-size: 4rem;
    }

    .empty-state h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .page-title h1 {
        font-size: 1.75rem;
    }

    .news-card-content {
        padding: 0.5rem;
    }

    .news-title {
        font-size: 0.9rem;
    }

    .author-avatar {
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }

    .author-name {
        font-size: 0.875rem;
    }
}