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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

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-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 {
    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);
}

/* 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);
}

/* Chat Section for Non-Moderators */
.chat-section {
    text-align: center;
    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);
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .search-title {
        font-size: 2rem;
    }
    
    .search-subtitle {
        font-size: 1rem;
    }
    
    .result-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

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

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

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

.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;
}
