/* CleanMe Website Styles */

/* ==================== HEADER OVERRIDE ==================== */
/* Override shared.css header to accommodate auth section */
.cleanme-header .header-container {
    max-width: 1200px;
    justify-content: space-between;
    gap: 20px;
}

.cleanme-header .site-nav {
    flex: 1;
    justify-content: center;
}

/* Auth Section (home uses .auth-section, browse/submit use .header-actions) */
.auth-section,
.header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    background: #5865F2;
    border-radius: 8px;
    color: white !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.login-btn:hover {
    background: #4752c4;
    transform: translateY(-1px);
    color: white !important;
}

.login-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* User Menu */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.user-name {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background: rgba(20, 20, 35, 0.98);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 1001;
}

.user-menu:hover .user-dropdown,
.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 0.7rem 1.1rem;
    color: var(--text-secondary) !important;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}

.user-dropdown a:hover {
    background: rgba(88, 101, 242, 0.15);
    color: #ffffff !important;
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    padding: 5rem 2rem 6rem;
    text-align: center;
}

.hero-content {
    max-width: 750px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3.5rem;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary svg,
.btn-secondary svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
    color: white;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-light);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Orbitron', monospace;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==================== HOW IT WORKS ==================== */
.how-it-works {
    padding: 4rem 2rem;
    background: var(--surface-color);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem auto;
    max-width: 900px;
}

.step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.step h3 {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.step code {
    background: var(--dark-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary);
}

.bot-invite {
    text-align: center;
    padding: 2rem;
    background: var(--dark-bg);
    border-radius: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.bot-invite p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.invite-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #5865F2;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.invite-btn:hover {
    background: #4752c4;
    color: white;
}

/* ==================== SERVER SECTIONS ==================== */
.servers-section {
    padding: 4rem 2rem;
}

.servers-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.25rem;
}

.view-all-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-top: 0.5rem;
}

.view-all-link:hover {
    text-decoration: underline;
    color: var(--primary);
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.server-card {
    position: relative;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.server-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(88, 101, 242, 0.15);
    color: inherit;
}

.server-card.featured {
    border-color: rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, transparent 100%);
}

.server-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1a1a2e;
}

.server-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 1rem;
}

.server-name {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.server-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    min-height: 40px;
}

.server-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.server-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.server-stat.votes {
    color: #ffd700;
}

.server-stat svg {
    opacity: 0.7;
}

.server-added {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ==================== ABOUT SECTION ==================== */
.about-section {
    padding: 4rem 2rem;
    background: var(--surface-color);
}

.about-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.about-card {
    background: var(--dark-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.about-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.about-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state .btn-primary {
    margin-top: 1rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cleanme-header .header-container {
        padding: 0 1rem;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    /* Logo grows to push auth + hamburger to the right */
    .cleanme-header .logo {
        flex: 1;
        min-width: 0;
    }

    /* Remove old hacky margin — hamburger is now inline */
    .auth-section,
    .header-actions {
        margin-right: 0;
        flex-shrink: 0;
    }

    /* Pull hamburger back into normal flex flow (overrides shared.css absolute) */
    .cleanme-header .header-container .mobile-menu-btn {
        position: static;
        flex-shrink: 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        text-align: center;
    }

    .server-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .server-detail-stats {
        justify-content: center;
    }

    .server-detail-actions {
        flex-direction: column;
    }

    .server-structure {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 1rem 4rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .servers-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================================
   Browse Page Styles
   =============================================== */

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

.browse-header {
    margin-bottom: 2rem;
    text-align: center;
}

.browse-header h1 {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.browse-header p {
    color: var(--text-muted);
}

.browse-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.filter-group select {
    padding: 0.5rem 1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.search-box {
    flex: 1;
    min-width: 200px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-left: 2.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    text-decoration: none;
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination span.current {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ===============================================
   Server Detail Page Styles
   =============================================== */

.server-detail {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

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

.server-detail-icon {
    width: 128px;
    height: 128px;
    border-radius: 24px;
    object-fit: cover;
}

.server-detail-info {
    flex: 1;
}

.server-detail-info h1 {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.server-detail-owner {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.server-detail-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.detail-stat {
    text-align: center;
}

.detail-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.detail-stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.server-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 160px;
}

.vote-btn-large,
.copy-template-btn,
.edit-template-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

.edit-template-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.edit-template-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid #ffd700;
    border-radius: 8px;
    color: #ffd700;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vote-btn:hover,
.vote-btn.voted {
    background: #ffd700;
    color: #1a1a2e;
}

.copy-command {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-family: monospace;
}

.copy-command button {
    background: var(--primary);
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    color: white;
    cursor: pointer;
}

.server-detail-description {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.server-detail-description h2 {
    color: var(--text-light);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.server-detail-description p {
    color: var(--text-muted);
    line-height: 1.7;
    white-space: pre-wrap;
}

.server-structure {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.structure-section {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.structure-section h3 {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.structure-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

.structure-list li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.structure-list li:last-child {
    border-bottom: none;
}

.role-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* ===============================================
   Submit/Dashboard Page Styles
   =============================================== */

.submit-container,
.dashboard-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.submit-container h1,
.dashboard-container h1 {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-align: center;
}

.submit-container > p,
.dashboard-container > p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-align: center;
}

.submit-form {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group label span {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.server-preview {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: none;
}

.server-preview.show {
    display: block;
}

.server-preview-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
}

.server-preview-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    flex-shrink: 0;
    object-fit: cover;
}

.server-preview-info {
    flex: 1;
    min-width: 0;
}

.server-preview-info h3 {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.server-preview-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.preview-stat {
    background: var(--dark-bg);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.preview-verified {
    color: #57f287;
    font-size: 0.8rem;
    margin: 0;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Dashboard */
.dashboard-servers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-server-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    flex-wrap: wrap;
}

.dashboard-server-card img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
}

.dashboard-server-info {
    flex: 1;
}

.dashboard-server-info h3 {
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.dashboard-server-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.dashboard-server-actions {
    display: flex;
    gap: 0.5rem;
}

.dashboard-server-actions a,
.dashboard-server-actions button {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
}

.dashboard-server-actions .edit-btn {
    background: var(--primary);
    border: none;
    color: white;
}

.dashboard-server-actions .delete-btn {
    background: transparent;
    border: 1px solid var(--error);
    color: var(--error);
}

/* Dashboard server card - JS-rendered class names */
.dashboard-server-card .server-info {
    flex: 1;
    min-width: 0;
}

.dashboard-server-card .server-info h3 {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-stats-mini {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.server-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-small {
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.15s;
}

.btn-small:hover { opacity: 0.85; }

.btn-small:not(.btn-edit):not(.btn-danger) {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

.btn-edit {
    background: var(--primary);
    color: white;
}

.btn-danger {
    background: transparent;
    border: 1px solid var(--error) !important;
    color: var(--error);
}

.btn-danger:hover { background: var(--error); color: white; opacity: 1; }

/* ==================== BROWSE PAGE ==================== */
.browse-main,
.submit-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

.browse-header,
.submit-header {
    text-align: center;
    margin-bottom: 2rem;
}

.browse-header h1,
.submit-header h1 {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.browse-header p,
.submit-header p {
    color: var(--text-muted);
}

.browse-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-form {
    display: flex;
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-form input {
    width: 100%;
    padding: 0.7rem 1rem;
    padding-right: 3rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
    font-family: inherit;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-form button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
}

.search-form button svg {
    width: 18px;
    height: 18px;
}

.search-form button:hover {
    color: var(--primary);
}

.category-filter,
.sort-filter {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    min-width: 140px;
    transition: border-color 0.2s ease;
}

.category-filter:focus,
.sort-filter:focus {
    outline: none;
    border-color: var(--primary);
}

.results-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.loading-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--text-muted);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== SUBMIT PAGE ==================== */
.requirements-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.requirements-card h3 {
    color: var(--text-light);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.requirements-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requirements-card li {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.requirements-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

.login-required {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.login-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: rgba(88, 101, 242, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.login-required h2 {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.login-required p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.login-btn.large {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.checkbox-group a {
    color: var(--primary);
}

.server-submit-form .submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.server-submit-form .submit-btn svg {
    width: 20px;
    height: 20px;
}

/* ==================== USER MENU (browse/submit variant) ==================== */
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.logout-btn {
    display: block;
    width: 100%;
    padding: 0.7rem 1.1rem;
    background: none;
    border: none;
    border-top: 1px solid var(--border-color);
    color: var(--error) !important;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(20, 20, 35, 0.98);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==================== LOADING STATE ==================== */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==================== SERVER DETAIL PAGE ==================== */

/* Server page uses .nav-links instead of .site-nav */
.nav-links {
    display: flex;
    gap: 5px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-links a:hover { color: #ffffff; }
.nav-links a.active { color: var(--primary); }

.server-detail-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    flex: 1;
    width: 100%;
}

.server-detail-container {
    max-width: 900px;
    margin: 0 auto;
}

.server-detail-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.4rem;
}

.server-detail-category {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    background: rgba(88, 101, 242, 0.12);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 20px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

/* Action buttons on server detail */
.vote-btn-large,
.copy-template-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vote-btn-large {
    background: transparent;
    border: 2px solid #ffd700;
    color: #ffd700;
}

.vote-btn-large:hover,
.vote-btn-large.voted {
    background: #ffd700;
    color: #1a1a2e;
}

.copy-template-btn {
    background: var(--primary);
    border: none;
    color: white;
}

.copy-template-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.vote-btn-large svg,
.copy-template-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Stats cards row */
.server-stats-cards {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 90px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.1rem;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Orbitron', monospace;
    display: block;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.stat-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 0.6rem;
    border-radius: 8px;
    background: rgba(88, 101, 242, 0.12);
}

.stat-icon.votes { background: rgba(255, 215, 0, 0.12); }
.stat-icon.copies { background: rgba(0, 255, 136, 0.1); }

/* Tabs */
.server-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
    overflow-x: auto;
}

.server-tab {
    padding: 0.65rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.server-tab:hover { color: var(--text-light); }

.server-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-contents {
    margin-bottom: 1.5rem;
}

.tab-content {
    display: none;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 1.5rem;
    min-height: 120px;
}

.tab-content.active { display: block; }

/* Owner card */
.server-owner-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.server-owner-card h3 {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.owner-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.owner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.owner-name {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
}

/* How to use */
.how-to-use-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.how-to-use-card h3 {
    color: var(--text-light);
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.how-to-use-card ol {
    padding-left: 1.4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
}

.how-to-use-card a { color: var(--primary); }

.how-to-use-card code {
    background: var(--dark-bg);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary);
}

.warning {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 1.1rem;
    padding: 0.75rem 1rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 8px;
    color: var(--warning);
    font-size: 0.85rem;
    line-height: 1.5;
}

.warning svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ==================== DASHBOARD PAGE ==================== */

.dashboard-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    flex: 1;
    width: 100%;
}

.dashboard-content {
    width: 100%;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
    flex-shrink: 0;
}

.user-welcome h1 {
    font-size: 1.4rem;
    color: var(--text-light);
    margin-bottom: 0.15rem;
    font-weight: 700;
}

.user-welcome p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.dashboard-username { color: var(--primary); }

.submit-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    background: var(--primary);
    border-radius: 8px;
    color: white;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.submit-new-btn svg { width: 15px; height: 15px; }

.submit-new-btn:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-stat-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.dashboard-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Orbitron', monospace;
    margin-bottom: 0.25rem;
    display: block;
    line-height: 1.2;
}

.dashboard-stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.my-servers-section h2 {
    color: var(--text-light);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.my-servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* ==================== RESPONSIVE — SERVER & DASHBOARD ==================== */
@media (max-width: 768px) {
    .server-detail-main,
    .dashboard-main {
        padding: 1.5rem 1rem;
    }

    .server-stats-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 10, 20, 0.98);
        border-top: 1px solid var(--border-color);
        padding: 15px;
        gap: 5px;
    }

    .nav-links.active { display: flex; }

    .nav-links a {
        font-size: 0.95rem;
        padding: 12px 16px;
        border-radius: 8px;
        text-align: center;
    }

    .nav-links a:hover { background: rgba(88, 101, 242, 0.15); }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .server-stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .server-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .server-detail-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .vote-btn-large,
    .copy-template-btn {
        flex: 1;
        justify-content: center;
        min-width: 130px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .browse-filters {
        flex-direction: column;
    }

    .search-form {
        width: 100%;
    }

    .filter-group {
        width: 100%;
    }

    .category-filter,
    .sort-filter {
        flex: 1;
        min-width: 0;
    }
}
