/* AlphaGaming.gg Stylesheet */

:root {
    --primary-color: #5865F2;
    --primary-dark: #4752C4;
    --secondary-color: #23272A;
    --text-color: #FFFFFF;
    --text-muted: #B9BBBE;
    --bg-dark: #2C2F33;
    --bg-darker: #23272A;
    --border-color: #40444B;
    --success-color: #57F287;
    --error-color: #ED4245;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Navigation */
.navbar {
    background-color: var(--secondary-color);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.brand-text {
    display: inline-block;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--text-color);
}

.discord-link {
    color: var(--primary-color) !important;
}

.nav-auth {
    margin-left: auto;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.user-name-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.username {
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.2;
}

.admin-status {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: block;
    margin-bottom: 0.25rem;
}

.user-name-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
    justify-content: center;
}

.role-badge {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    border: none;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-top: 0;
}

.admin-mode-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0.5rem;
}

.admin-mode-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-muted);
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background-color: #fff;
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--primary-color);
}

.btn-login,
.btn-logout {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-login:hover,
.btn-logout:hover {
    background-color: var(--primary-dark);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 4rem 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--bg-dark);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-darker);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background-color: var(--bg-dark);
}

/* Features Section */
.features-section {
    margin-top: 4rem;
}

.features-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background-color: var(--bg-dark);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Downloads */
.page-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.downloads-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
}

.download-card {
    position: relative;
    background-color: var(--bg-dark);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.download-card:hover {
    border-color: var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.download-card.inactive-download {
    opacity: 0.5;
    border: 2px dashed var(--border-color);
}

.download-card.inactive-download:hover {
    opacity: 0.7;
}

.inactive-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
    text-transform: uppercase;
}

.download-image {
    flex: 0 0 460px;
    width: 460px;
    height: 215px;
    background-color: #1a1a1a;
    overflow: hidden;
    position: relative;
    aspect-ratio: 460 / 215;
}

.download-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive image sizing */
@media (max-width: 1200px) {
    .download-image {
        flex: 0 0 35%;
        width: 35%;
        height: auto;
    }
}

@media (max-width: 992px) {
    .download-image {
        flex: 0 0 40%;
        width: 40%;
    }
}

.download-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.download-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.download-card h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
    flex: 1;
    line-height: 1.3;
    min-width: 200px;
}

.download-header-badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.version-badge {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.update-badge {
    background-color: var(--bg-darker);
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
}

.download-description {
    color: var(--text-muted);
    margin: 1rem 0;
    line-height: 1.6;
    flex: 1;
}

.download-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 1rem 0;
    flex-wrap: wrap;
    align-items: center;
}

.download-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.added-by {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.added-by-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    vertical-align: middle;
}

.added-by strong {
    color: var(--text-color);
    font-weight: 500;
}

.download-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.error-message {
    background-color: var(--bg-dark);
    border: 2px solid var(--error-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: var(--error-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(237, 66, 69, 0.2);
}

.error-message strong {
    font-weight: 600;
}

/* Blog */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.article-card {
    position: relative;
    background-color: var(--bg-dark);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.article-card.unpublished-article {
    opacity: 0.5;
    border: 2px dashed var(--border-color);
}

.article-card.unpublished-article:hover {
    opacity: 0.7;
}

.unpublished-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 165, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
    text-transform: uppercase;
}

.article-featured-image-preview {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.article-featured-image-preview img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 400px;
    object-fit: contain;
}

.article-header h2 {
    margin-bottom: 1rem;
}

.article-header h2 a {
    color: var(--text-color);
    text-decoration: none;
}

.article-header h2 a:hover {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.author-name {
    font-weight: 500;
}

.article-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.article-excerpt {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Article Full */
.article-full {
    max-width: 800px;
    margin: 0 auto;
}

.article-full h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-featured-image {
    margin: 2rem 0;
}

.article-featured-image img {
    width: 100%;
    border-radius: 8px;
}

.article-content {
    line-height: 1.8;
    font-size: 1.1rem;
    margin: 2rem 0;
    white-space: pre-wrap;
}

.article-content p:first-child {
    text-indent: 0;
    margin-top: 0;
}

.article-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.btn-like {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-like:hover {
    background-color: var(--bg-dark);
}

.btn-like.liked {
    background-color: var(--error-color);
    border-color: var(--error-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-info {
    color: var(--text-muted);
}

/* Footer */
.admin-mode-toggle-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.footer {
    background-color: var(--secondary-color);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .features-grid,
    .downloads-grid {
        grid-template-columns: 1fr;
    }

    .download-card {
        flex-direction: column;
    }

    .download-image {
        width: 100%;
        height: auto;
        aspect-ratio: 460 / 215;
        flex: 0 0 auto;
    }

    .download-content {
        padding: 1.5rem;
    }

    .download-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-meta,
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

