/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #9c88ff;
    --primary-hover: #b8a7ff;
    --background: #0a0a0a;
    --surface: #1a1a1a;
    --surface-hover: #252525;
    --text-primary: #f1f5f9;
    --text-secondary: #a0a0a0;
    --border: #2a2a2a;
    --shadow: rgba(0, 0, 0, 0.3);
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --pastel-purple: #9c88ff;
    --pastel-purple-light: #b8a7ff;
    --pastel-purple-dark: #8a76f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

header .container {
    padding: 0 2rem;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Search Section */
.search-section {
    margin: 3rem 0;
    text-align: center;
}

.search-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Search Box */
.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

/* Results Section */
.results-section {
    margin-top: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.results-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sort-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.sort-select {
    padding: 8px 36px 8px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-weight: 500;
}

.sort-select:hover {
    border-color: var(--primary-color);
    background-color: var(--surface-hover);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.hash-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 6px 12px;
    background: var(--surface-hover);
    border-radius: 6px;
    border: 1px solid var(--border);
    font-weight: 500;
}

.results-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Results Grid */
.results-grid {
    display: grid;
    gap: 1rem;
}

/* Result Card */
.result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.result-card:hover {
    background: var(--surface-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.report-warning-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(239, 68, 68, 0.3);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: help;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.btn-download, .btn-info, .btn-report, .btn-like, .btn-dislike, .btn-comments, .btn-send-switch {
    flex: 1;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-download:hover {
    background: var(--primary-hover);
}

.btn-info {
    background: rgba(90, 159, 212, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(90, 159, 212, 0.3);
}

.btn-info:hover {
    background: rgba(90, 159, 212, 0.2);
}

.btn-report {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-report:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-like {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.btn-like:hover {
    background: rgba(34, 197, 94, 0.2);
}

.btn-dislike {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.btn-dislike:hover {
    background: rgba(249, 115, 22, 0.2);
}

.btn-comments {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.btn-comments:hover {
    background: rgba(139, 92, 246, 0.2);
}

.btn-send-switch {
    background: rgba(34, 211, 238, 0.1);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.3);
}

.btn-send-switch:hover {
    background: rgba(34, 211, 238, 0.2);
}

/* Info Modal */
.info-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.info-modal {
    background: var(--surface);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.info-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 10;
}

.info-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.info-modal-body {
    padding: 1.5rem;
}

.info-file-name {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    word-break: break-word;
}

.info-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-section h5 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    gap: 1rem;
}

.info-row.warning {
    background: rgba(239, 68, 68, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    margin: 0.5rem 0;
}

.info-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
}

.info-value {
    color: var(--text-primary);
    font-size: 0.875rem;
    text-align: right;
}

.info-value.small {
    font-size: 0.75rem;
    word-break: break-all;
}

.info-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.btn-download-full {
    padding: 0.75rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-download-full:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Report Modal */
.report-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.report-modal {
    background: var(--surface);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.report-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.report-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.report-modal-body {
    padding: 1.5rem;
}

.report-modal-body p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

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

.form-textarea {
    resize: vertical;
}

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

.btn-cancel, .btn-submit {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background: var(--surface-hover);
    color: var(--text-secondary);
}

.btn-cancel:hover {
    background: var(--border);
}

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

.btn-submit:hover {
    background: var(--primary-hover);
}

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

.result-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.result-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.file-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-type-nsp {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.file-type-nsz {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.file-type-xci {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state-message {
    font-size: 1rem;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
}

/* Moderator Actions Section */
.mod-actions-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.mod-actions-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.mod-actions-card:hover {
    border-color: #6c5ce7;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.2);
}

.mod-action-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mod-action-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mod-action-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pending-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #6c5ce7, #5f4dd8);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.btn-view-requests {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #6c5ce7, #5f4dd8);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-view-requests:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.btn-chat {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Primary Actions Section - Search and Mirrors */
.primary-actions-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.primary-actions-title {
    text-align: center;
    color: white;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.primary-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.btn-primary-action {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    position: relative;
}

.btn-primary-action:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.btn-primary-action .btn-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.btn-primary-action .btn-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.btn-primary-action .btn-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.btn-primary-action .btn-description {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.btn-search-primary:hover {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-search-primary:hover .btn-title,
.btn-search-primary:hover .btn-description {
    color: white;
}

.btn-mirrors-primary {
    overflow: visible;
}

.btn-mirrors-primary:hover {
    background: linear-gradient(135deg, #00b894 0%, #00d9a5 100%);
}

.btn-mirrors-primary:hover .btn-title,
.btn-mirrors-primary:hover .btn-description {
    color: white;
}

.mirrors-primary-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.mirrors-primary-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mirror-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.mirror-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mirror-icon {
    font-size: 1.2rem;
}

.mirror-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0.5rem 0;
}

@media (max-width: 768px) {
    .primary-actions-section {
        padding: 1.5rem 1rem;
    }
    
    .primary-actions-title {
        font-size: 1.4rem;
    }
    
    .primary-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-primary-action .btn-icon {
        font-size: 2rem;
    }
}

/* Chat Section for Non-Moderators */
.quick-links-section {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-chat-hero {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-chat-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-discord {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #5865F2, #4752C4);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.2);
}

.btn-discord:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(88, 101, 242, 0.4);
}

.btn-api-docs {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #5a9fd4, #4a7fb4);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(90, 159, 212, 0.2);
}

.btn-api-docs:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(90, 159, 212, 0.4);
}

/* Send to Switch Section */
.send-to-switch-section {
    margin: 3rem 0;
}

.send-to-switch-card {
    background: linear-gradient(135deg, rgba(156, 136, 255, 0.05) 0%, rgba(184, 167, 255, 0.05) 100%);
    border: 2px solid rgba(156, 136, 255, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 24px rgba(156, 136, 255, 0.1);
}

.send-to-switch-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.send-to-switch-icon {
    font-size: 2.5rem;
}

.send-to-switch-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.send-to-switch-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.send-to-switch-description strong {
    color: var(--primary-color);
    font-weight: 600;
}

.send-to-switch-features {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(156, 136, 255, 0.1);
    border-radius: 12px;
    flex: 1;
    min-width: 200px;
}

.feature-icon {
    font-size: 1.5rem;
}

.feature-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.send-to-switch-setup {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.setup-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.setup-steps {
    display: grid;
    gap: 1.5rem;
}

.setup-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

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

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.step-content code {
    background: rgba(156, 136, 255, 0.15);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--primary-color);
}

.step-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.step-content a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.send-to-switch-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-download-primary,
.btn-github,
.btn-sphaira {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(156, 136, 255, 0.3);
}

.btn-download-primary:hover,
.btn-github:hover,
.btn-sphaira:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(156, 136, 255, 0.5);
}

.btn-sphaira {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-sphaira:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .search-title {
        font-size: 2rem;
    }
    
    .search-subtitle {
        font-size: 1rem;
    }
    
    .search-input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .results-controls {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .sort-label {
        display: none;
    }
    
    .sort-select {
        width: 100%;
    }
    
    .hash-count {
        width: 100%;
        text-align: center;
    }
    
    .results-count {
        width: 100%;
        text-align: center;
    }
    
    .result-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .result-actions {
        flex-wrap: wrap;
    }
    
    .result-actions > button {
        min-width: 45%;
        flex: 1 1 45%;
    }

    .mod-actions-section {
        grid-template-columns: 1fr;
    }

    .mod-action-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .send-to-switch-card {
        padding: 1.5rem;
    }

    .send-to-switch-title {
        font-size: 1.375rem;
    }

    .send-to-switch-features {
        flex-direction: column;
        gap: 1rem;
    }

    .feature-item {
        min-width: auto;
    }

    .send-to-switch-setup {
        padding: 1.5rem;
    }

    .setup-step {
        flex-direction: column;
        gap: 1rem;
    }

    .send-to-switch-links {
        flex-direction: column;
    }

    .btn-github,
    .btn-sphaira {
        width: 100%;
        justify-content: center;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .search-title {
        font-size: 1.75rem;
    }
    
    .search-input {
        padding: 0.75rem;
        font-size: 0.9375rem;
    }
    
    .result-title {
        font-size: 1rem;
    }
}

/* Pagination Controls */
.pagination-container {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Top pagination has no top border and adjusted spacing */
#pagination-controls-top.pagination-container {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    margin-bottom: 2rem;
}

.pagination-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.items-per-page-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.items-per-page-select {
    padding: 0.375rem 0.75rem;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.items-per-page-select:hover {
    border-color: var(--primary-color);
}

.items-per-page-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.page-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.page-button {
    padding: 0.5rem 1rem;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.page-button:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--primary-color);
}

.page-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.page-number-button {
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-number-button:hover {
    background: var(--surface-hover);
    border-color: var(--primary-color);
}

.page-number-button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-ellipsis {
    padding: 0 0.25rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .pagination-wrapper {
        gap: 1.25rem;
    }
    
    .page-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .page-numbers {
        order: -1;
    }
    
    .page-button {
        width: 100%;
    }
}

/* Hash Display Styles */
.hash-value {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    word-break: break-all;
    padding: 6px;
    background: #1a1a1a;
    border-radius: 4px;
    display: block;
    margin-top: 4px;
}

.btn-compute-hash {
    padding: 8px 16px;
    background: linear-gradient(135deg, #5a9fd4, #4a7fb4);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.btn-compute-hash:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(90, 159, 212, 0.4);
}

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

/* How to Play Section Styles */
.how-to-play-section {
    margin: 40px 0;
    padding: 0 20px;
}

.how-to-play-header {
    text-align: center;
    margin-bottom: 30px;
}

.how-to-play-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.how-to-play-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.how-to-play-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.how-to-play-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #f0f0f0;
}

.how-to-play-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
}

.card-content {
    color: #555;
    line-height: 1.6;
}

.instruction-list {
    margin: 0;
    padding-left: 20px;
    margin-bottom: 15px;
}

.instruction-list li {
    margin-bottom: 10px;
}

.instruction-list strong {
    color: #333;
}

.instruction-list code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d63384;
}

.card-note {
    background: #484333;
    border-left: 4px solid #ffc107;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
}

.card-note strong {
    color: #f2e5bc;
}

.modding-services-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.modding-services-card .card-title,
.modding-services-card .card-content {
    color: white;
}

.modding-text {
    text-align: center;
    font-size: 1.05rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-modding-services {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: white;
    color: #667eea;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-modding-services:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
}

/* Comments Modal */
.comments-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.comments-modal {
    background: var(--surface);
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.comments-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comments-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.comments-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.comments-list {
    margin-bottom: 2rem;
}

.comment-item {
    background: var(--background);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.875rem;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: auto;
}

.comment-text {
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comment-replies {
    margin-left: 2rem;
    border-left: 2px solid var(--border);
    padding-left: 1rem;
}

.loading-comments, .no-comments, .error-comments {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

.comment-form {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.comment-form h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
}

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

.btn-submit-comment {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit-comment:hover {
    background: var(--primary-hover);
}

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

@media (max-width: 768px) {
    .how-to-play-content {
        grid-template-columns: 1fr;
    }
    
    .how-to-play-title {
        font-size: 1.6rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
}

/* Vote buttons in meta section */
.meta-item-interactive {
    cursor: pointer;
    transition: all 0.2s ease;
}

.meta-item-interactive:hover {
    transform: scale(1.05);
}

.vote-button {
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 2px;
}

.vote-button:hover {
    transform: scale(1.2);
    filter: brightness(1.3);
}

/* User badges in comments */
.user-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 0.5rem;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin {
    background: linear-gradient(135deg, #d8b4fe 0%, #c084fc 100%);
    color: #1a1a1a;
    box-shadow: 0 0 15px rgba(216, 180, 254, 0.6);
    animation: glow-admin 2s ease-in-out infinite;
}

.badge-mod {
    background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
    color: #1a1a1a;
    box-shadow: 0 0 15px rgba(147, 197, 253, 0.6);
    animation: glow-mod 2s ease-in-out infinite;
}

.badge-uploader {
    background: linear-gradient(135deg, #bbf7d0 0%, #86efac 100%);
    color: #1a1a1a;
    box-shadow: 0 0 10px rgba(187, 247, 208, 0.4);
}

.badge-downloader {
    background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%);
    color: #1a1a1a;
}

/* User role-based comment author colors */
.comment-author-admin {
    color: #d8b4fe !important;
    text-shadow: 0 0 10px rgba(216, 180, 254, 0.6);
    animation: glow-admin 2s ease-in-out infinite;
    font-weight: 700;
}

.comment-author-mod {
    color: #93c5fd !important;
    text-shadow: 0 0 10px rgba(147, 197, 253, 0.6);
    animation: glow-mod 2s ease-in-out infinite;
    font-weight: 700;
}

.comment-author-uploader {
    color: #bbf7d0 !important;
    font-weight: 700;
}

.comment-author-downloader {
    color: #e9d5ff !important;
    font-weight: 600;
}

/* Glowing animations */
@keyframes glow-admin {
    0%, 100% {
        text-shadow: 0 0 10px rgba(216, 180, 254, 0.6);
    }
    50% {
        text-shadow: 0 0 20px rgba(216, 180, 254, 0.9), 0 0 30px rgba(216, 180, 254, 0.6);
    }
}

@keyframes glow-mod {
    0%, 100% {
        text-shadow: 0 0 10px rgba(147, 197, 253, 0.6);
    }
    50% {
        text-shadow: 0 0 20px rgba(147, 197, 253, 0.9), 0 0 30px rgba(147, 197, 253, 0.6);
    }
}

/* Update comment header to accommodate badges */
.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
