:root {
    --bg-base: #0a0a0a;
    --bg-nav: #0a0a0a;
    --bg-input: #171717;
    --border-color: #262626;
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --text-darker: #737373;
    --accent-red: #dc2626;
    --accent-red-hover: #b91c1c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

.navbar {
    background-color: var(--bg-nav);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-container {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-right {
    gap: 1rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.logo-link img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.text-red {
    color: var(--accent-red);
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-links a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-divider {
    height: 1.5rem;
    width: 1px;
    background-color: var(--border-color);
    margin: 0 0.5rem;
}

.search-form {
    position: relative;
}

.search-form input {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem 0.375rem 2.25rem;
    font-size: 0.875rem;
    width: 12rem;
    transition: all 0.2s;
}

.search-form input:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 1px var(--accent-red);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    color: var(--text-darker);
}

.btn {
    padding: 0.375rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: bold;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--accent-red);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(153, 27, 27, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-red-hover);
}

.btn-outline {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: #d4d4d4;
}

.btn-outline:hover {
    border-color: var(--accent-red);
}

.btn:disabled {
    background-color: #450a0a;
    color: var(--text-muted);
    cursor: wait;
    border-color: #450a0a;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
}

.logout-btn {
    color: var(--text-darker);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.logout-btn:hover {
    color: var(--accent-red);
}

.site-footer {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.site-footer a:hover {
    color: var(--text-main);
}

@media (max-width: 1024px) {
    .hide-lg {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hide-md {
        display: none !important;
    }

    .nav-links {
        display: none;
    }
}

@media (max-width: 640px) {
    .hide-sm {
        display: none !important;
    }
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.legal-page {
    max-width: 56rem;
}

.legal-page > h1 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-size: 2.25rem;
    font-weight: 700;
}

.legal-content {
    color: var(--text-muted);
    line-height: 1.75;
}

.legal-content h2 {
    margin-top: 1.5rem;
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 700;
}

.legal-content ul {
    display: grid;
    gap: 0.5rem;
    padding-left: 1.25rem;
    list-style: disc;
}

.card {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

.profile-header {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

@media (min-width: 768px) {
    .profile-header {
        flex-direction: row;
    }
}

.profile-avatar-container {
    text-align: center;
    flex-shrink: 0;
}

.profile-avatar-container img {
    width: 8rem;
    height: 8rem;
    border-radius: 0.5rem;
    border: 2px solid var(--accent-red);
    object-fit: cover;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 1rem;
    color: white;
}

.profile-username {
    color: var(--text-darker);
    font-family: monospace;
    font-size: 0.875rem;
}

.profile-follow-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text-muted);
}

.profile-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    flex: 1;
    text-align: center;
}

.stat-label {
    color: var(--text-label);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.text-yellow {
    color: #eab308;
}

.bio-box {
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 1rem;
    min-height: 6rem;
}

.bio-box p {
    color: #d4d4d4;
    white-space: pre-wrap;
    font-size: 0.875rem;
    line-height: 1.5;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin: 2rem 0 1rem 0;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.badge-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .badge-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.badge-card {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    transition: border-color 0.2s;
}

.badge-card:hover {
    border-color: #525252;
}

.badge-img {
    width: 4rem;
    height: 4rem;
    border-radius: 0.375rem;
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    object-fit: cover;
}

.badge-info {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge-title-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.badge-title {
    font-weight: bold;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-game {
    font-size: 0.875rem;
    color: #f87171;
    text-decoration: none;
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.badge-game:hover {
    color: #fca5a5;
}

.badge-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-darker);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 0.5rem;
}

.pagination .btn {
    background-color: var(--border-color);
    color: white;
}

.pagination .btn:hover:not(:disabled) {
    background-color: var(--accent-red);
}

.form-group {
    width: 100%;
    margin-top: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.textarea {
    width: 100%;
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.75rem;
    color: #d4d4d4;
    font-family: inherit;
    font-size: 0.875rem;
    resize: none;
    min-height: 6rem;
    transition: border-color 0.2s;
}

.textarea:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 1px var(--accent-red);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.game-card {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s;
}

.game-card:hover {
    border-color: var(--accent-red);
}

.game-banner {
    height: 8rem;
    background-color: var(--bg-base);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.game-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.game-card:hover .game-banner img {
    opacity: 1;
}

.game-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.game-card-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.game-card:hover .game-card-title {
    color: #ef4444;
}

.game-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .game-header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.game-header-logo {
    width: 5rem;
    height: 5rem;
    border-radius: 0.75rem;
    border: 2px solid #404040;
    object-fit: cover;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.badge-walk-tag {
    background-color: #7f1d1d;
    color: #fecaca;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #b91c1c;
    margin-left: 0.75rem;
}

.btn-green {
    background-color: #16a34a;
    color: white;
    border: 1px solid #15803d;
}

.btn-green:hover {
    background-color: #15803d;
}

.game-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .game-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.sidebar-box {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.game-badge-row {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.game-badge-unlocked {
    background-color: var(--bg-input);
    border-color: rgba(20, 83, 45, 0.5);
}

.game-badge-unlocked:hover {
    border-color: rgba(20, 83, 45, 0.8);
}

.game-badge-locked {
    background-color: var(--bg-base);
    opacity: 0.75;
    filter: grayscale(100%);
}

.game-badge-locked:hover {
    filter: grayscale(0%);
    border-color: #404040;
    opacity: 1;
}

.table-container {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

.table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

.table th {
    background-color: var(--bg-base);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    font-weight: 600;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background-color: rgba(38, 38, 38, 0.5);
}

.table .rank-col {
    width: 4rem;
    text-align: center;
    font-weight: bold;
    color: var(--text-darker);
    transition: color 0.2s;
}

.table tr:hover .rank-col {
    color: white;
}

.table .text-right {
    text-align: right;
}

.search-section {
    margin-bottom: 3rem;
}

.search-section-header {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.user-card {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s;
}

.user-card:hover {
    border-color: var(--accent-red);
}

.user-card-img {
    width: 4rem;
    height: 4rem;
    border-radius: 0.375rem;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.guide-card {display: flex; flex-direction: column; background-color: var(--bg-input); border: 1px solid var(--border-color); border-radius: 0.5rem; padding: 1.25rem; transition: border-color 0.2s;}
.guide-card:hover { border-color: var(--border-color);}
.guide-card-title { font-size: 1.25rem; font-weight: bold; color: white; margin-bottom: 0.5rem; transition: color 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.guide-card:hover .guide-card-title { color: #f87171;}
.guide-card-excerpt { font-size: 0.875rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 1rem; flex-grow: 1; line-height: 1.5;}
.guide-card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; padding-top: 1rem; border-top: 1px solid var(--border-color); margin-top: auto; }

.guide-reader-container { max-width: 800px; margin: 0 auto; }
.guide-reader-header { background-color: var(--bg-nav); padding: 2rem; border-bottom: 1px solid var(--border-color); }
.guide-reader-body { padding: 2rem; font-size: 1rem; line-height: 1.7; color: #d4d4d4; white-space: pre-wrap; font-family: system-ui, sans-serif; }