/* Base styles and variables */
:root {
    --primary: #ff1493;
    --primary-dark: #cc0e76;
    --primary-light: #ff65b3;
    --secondary: #00ff66;
    --text: #ffffff;
    --bg-dark: #0a0a0a;
    --bg-medium: #181818;
    --bg-light: #232323;
    --success: #00ff66;
    --error: #ff3364;
    --warning: #ffcc00;
    --glow-primary: 0 0 10px rgba(255, 20, 147, 0.8),
        0 0 20px rgba(255, 20, 147, 0.5);
    --glow-secondary: 0 0 10px rgba(0, 255, 102, 0.8),
        0 0 20px rgba(0, 255, 102, 0.5);
}

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

body {
    font-family: "Share Tech Mono", monospace;
    background-color: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Effects */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../images/scanline.svg");
    pointer-events: none;
    opacity: 0.2;
    z-index: 9;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../images/grid.svg");
    background-size: 50px 50px;
    pointer-events: none;
    opacity: 0.1;
    z-index: 8;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "VT323", monospace;
    color: var(--primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary);
    text-shadow: var(--glow-primary);
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

header {
    background-color: var(--bg-medium);
    padding: 1rem 0;
    border-bottom: 2px solid var(--primary);
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.3);
    position: relative;
}

.logo {
    font-family: "XBAND Rough", monospace;
    font-size: 2.5rem;
    color: var(--primary);
    text-align: center;
    text-shadow: var(--glow-primary);
    letter-spacing: 2px;
}

.logo-link {
    display: block;
}

.terminal-line {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.terminal-prompt {
    color: var(--primary);
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: var(--primary);
    margin-left: 5px;
    animation: blink 1s step-end infinite;
}

main {
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

footer {
    background-color: var(--bg-medium);
    padding: 1rem 0;
    border-top: 2px solid var(--primary);
    position: relative;
}

.terminal-footer {
    display: flex;
    justify-content: space-around;
    font-size: 0.8rem;
    color: var(--primary-light);
}

/* Search form */
.search-form {
    margin-bottom: 2rem;
}

.search-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1rem;
    background-color: var(--bg-light);
    border: 1px solid var(--primary);
    color: var(--text);
    font-family: "Share Tech Mono", monospace;
    font-size: 1rem;
    box-shadow: inset 0 0 10px rgba(255, 20, 147, 0.2);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.4);
}

.category-select {
    padding: 0.8rem 1rem;
    background-color: var(--bg-light);
    border: 1px solid var(--primary);
    color: var(--text);
    font-family: "Share Tech Mono", monospace;
    font-size: 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ff1493' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.category-select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.4);
}

.search-button {
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-dark);
    border: 1px solid var(--primary);
    color: var(--text);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    font-family: "XBAND Rough", monospace;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-button:hover {
    background-color: var(--primary);
    box-shadow: var(--glow-primary);
}

.search-button:before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    transition: all 0.5s ease;
    z-index: 1;
}

.search-button:hover:before {
    left: 100%;
}

.search-button:active {
    transform: scale(0.98);
}

/* Terminal Window */
.terminal-window {
    background-color: var(--bg-medium);
    border: 1px solid var(--primary);
    border-radius: 5px;
    margin-bottom: 2rem;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.2);
    overflow: hidden;
}

.terminal-header {
    background-color: var(--bg-light);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--primary);
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    background-color: var(--primary-dark);
}

.terminal-title {
    color: var(--primary);
    font-size: 0.8rem;
    margin-left: 1rem;
}

.terminal-content {
    padding: 1rem;
    font-size: 0.9rem;
    max-height: 300px;
    overflow-y: auto;
}

.terminal-content p {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Color Text Utilities */
.pink-text {
    color: var(--primary);
}

.green-text {
    color: var(--success);
}

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

.yellow-text {
    color: var(--warning);
}

/* Welcome Page */
.welcome-header {
    text-align: center;
    margin: 1rem 0 2rem;
    font-size: 2.2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-box {
    background-color: var(--bg-medium);
    border: 1px solid var(--primary);
    padding: 1.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.3);
}

.feature-title {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.feature-desc {
    font-size: 0.9rem;
    color: var(--text);
}

/* Results Page */
.results-header {
    margin-bottom: 1.5rem;
}

.results-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.table-container {
    overflow-x: auto;
    background-color: var(--bg-medium);
    border: 1px solid var(--primary);
    border-radius: 5px;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.2);
}

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

.results-table th {
    background-color: var(--bg-light);
    color: var(--primary);
    padding: 1rem;
    font-weight: normal;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--primary);
}

.results-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 20, 147, 0.2);
    font-size: 0.9rem;
}

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

.results-table tr:hover {
    background-color: rgba(255, 20, 147, 0.1);
}

/* Clickable download rows */
.download-row {
    cursor: pointer;
    position: relative;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.download-row:hover {
    background-color: rgba(255, 20, 147, 0.2) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 20, 147, 0.3);
}

.download-row:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(255, 20, 147, 0.3);
}

.name-cell {
    position: relative;
    transition: color 0.2s;
    color: var(--secondary);
}

.name-cell-link {
    display: inline-block;
    width: 100%;
    height: 100%;
}

.download-row:hover .name-cell {
    color: var(--success);
    text-shadow: 0 0 5px rgba(123, 104, 238, 0.5);
}

/* Keep this empty so we can restore it if needed */
@keyframes downloadGlitch {
    0%,
    100% {
        transform: translateY(0);
    }
    25% {
        transform: translate(-1px, 2px);
    }
    75% {
        transform: translate(1px, -2px);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.5;
    }
}

/* This declaration was moved up */

.progress-container {
    position: relative;
    width: 100%;
    height: 18px;
    background-color: var(--bg-dark);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary-dark), var(--primary));
    position: relative;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    color: var(--text);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

.completed-value {
    font-weight: bold;
}

.se-value {
    color: var(--success);
    font-weight: bold;
}

.le-value {
    color: var(--error);
    font-weight: bold;
}

.system-message {
    background-color: var(--bg-medium);
    border: 1px solid var(--primary);
    padding: 0.8rem 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    padding: 0.5rem;
    background-color: var(--bg-light);
    border-radius: 5px;
    border: 1px solid rgba(255, 20, 147, 0.2);
}

.pagination-button {
    background-color: var(--bg-medium);
    border: 1px solid var(--primary);
    color: var(--text);
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 2.5rem;
    text-align: center;
}

.pagination-button:hover {
    background-color: var(--primary);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(255, 20, 147, 0.3);
    position: relative;
    z-index: 1;
}

.pagination-button:hover::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background-color: transparent;
    border: 1px solid var(--success);
    z-index: -1;
    animation: glitchBorder 0.3s infinite;
}

@keyframes glitchBorder {
    0%,
    100% {
        clip-path: inset(0 0 0 0);
    }
    25% {
        clip-path: inset(0 0 85% 0);
    }
    50% {
        clip-path: inset(35% 0 0 0);
    }
    75% {
        clip-path: inset(0 85% 0 0);
    }
}

.pagination-button.active {
    background-color: var(--primary);
    color: var(--bg-dark);
    font-weight: bold;
}

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

.pagination-button.disabled:hover {
    background-color: var(--bg-medium);
    color: var(--text);
    transform: none;
    box-shadow: none;
}

.pagination-button.disabled:hover::before {
    display: none;
}

.pagination-ellipsis {
    color: var(--text-light);
    margin: 0 0.3rem;
}

/* No Results Page */
.no-results-container {
    text-align: center;
}

.error-code {
    margin: 1.5rem 0;
    color: var(--error);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.suggestions {
    margin: 2rem auto;
    max-width: 500px;
    background-color: var(--bg-medium);
    border: 1px solid var(--primary);
    padding: 1.5rem;
    border-radius: 5px;
    text-align: left;
}

.suggestions h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    text-align: center;
}

.suggestions ul {
    list-style-type: none;
}

.suggestions li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.suggestions li:before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Animations */
@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.blink {
    animation: blink 1s step-end infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
        gap: 0.8rem;
    }

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

    .results-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .terminal-footer {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}
