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

html, body {
    height: 100%;
}

body {
    background-color: #0a0a0a;
    color: #00ff9f; /* Neon green */
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    overflow-y: scroll;
    max-width: 1200px;
    margin: 0 auto;
    border-left: 1px solid #00ff9f;
    border-right: 1px solid #00ff9f;
    position: relative;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 255, 159, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 255, 159, 0.05) 0%, transparent 20%);
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(rgba(0, 255, 159, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 159, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: -1;
}

header {
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #00ff9f;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #00ff9f, transparent);
}

h1 a {
    font-size: 2.5rem;
    color: #00ff9f;
    text-decoration: none;
    text-shadow: 0 0 10px #00ff9f;
    font-weight: bold;
    letter-spacing: 2px;
}

h1 a:hover {
    text-shadow: 0 0 20px #00ff9f;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: #00ff9f;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #00ff9f;
    border-radius: 3px;
    text-shadow: 0 0 5px #00ff9f;
    transition: all 0.3s;
    font-weight: bold;
    letter-spacing: 1px;
}

nav a:hover {
    background-color: rgba(0, 255, 159, 0.1);
    box-shadow: 0 0 10px #00ff9f;
}

nav form {
    display: inline;
}

nav form button {
    height: auto;
    padding: 0.25rem 0.5rem;
    margin: 0;
    font-size: 0.9rem;
    background-color: transparent;
    border: 1px solid #00ff9f;
    color: #00ff9f;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

nav form button:hover {
    background-color: rgba(0, 255, 159, 0.2);
    box-shadow: 0 0 15px #00ff9f;
}

nav span {
    font-family: 'Courier New', monospace;
    color: #00ff9f;
}

footer {
    position: sticky;
    top: 100vh;
    padding: 1rem 0;
    border-top: 1px solid #00ff9f;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #00cc7f;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px #00ff9f;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #00e68a;
    text-shadow: 0 0 5px #00e68a;
}

main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem;
}

main form > div {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #00e68a;
    font-weight: bold;
}

input {
    padding: 0.75rem;
    background-color: rgba(0, 255, 159, 0.1);
    border: 1px solid #00ff9f;
    color: #00ff9f;
    width: 100%;
    font-family: 'Courier New', monospace;
}

input:focus {
    outline: none;
    box-shadow: 0 0 10px #00ff9f;
}

/* Ghost in the Shell inspired input */
.ghost-dropdown input {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00aaff;
    color: #00aaff;
    text-shadow: 0 0 5px #00aaff;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
    transition: all 0.3s ease;
}

.ghost-dropdown input:focus {
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.7);
    background: rgba(0, 10, 20, 0.9);
}

/* Cyberpunk Button Styles */
.cyberpunk-button {
    height: 2.5rem;
    cursor: pointer;
    padding: 0 2rem;
    background-color: transparent;
    border: 1px solid #00ff9f;
    color: #00ff9f;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.cyberpunk-button:hover {
    background-color: rgba(0, 255, 159, 0.2);
    box-shadow: 0 0 15px #00ff9f;
}

.button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 159, 0.4), transparent);
    transition: left 0.5s;
}

.cyberpunk-button:hover .button-glow {
    left: 100%;
}

.cyberpunk-loader {
    border: 2px solid #00ff9f;
    border-top: 2px solid transparent;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator {
    display: inline;
}
.htmx-request.htmx-indicator {
    display: inline;
}

/* Variants */
.cyberpunk-warning {
    color: #ff0;
    border-color: #ff0;
}
.cyberpunk-warning:hover {
    background-color: rgba(255, 255, 0, 0.2);
    box-shadow: 0 0 15px #ff0;
}

.cyberpunk-danger {
    color: #f00;
    border-color: #f00;
}
.cyberpunk-danger:hover {
    background-color: rgba(255, 0, 0, 0.2);
    box-shadow: 0 0 15px #f00;
}

.cyberpunk-secondary {
    color: #0ff;
    border-color: #0ff;
}
.cyberpunk-secondary:hover {
    background-color: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px #0ff;
}

.cyberpunk-info {
    color: #00f;
    border-color: #00f;
}
.cyberpunk-info:hover {
    background-color: rgba(0, 0, 255, 0.2);
    box-shadow: 0 0 15px #00f;
}

button {
    height: 2.5rem;
    cursor: pointer;
    padding: 0 2rem;
    background-color: transparent;
    border: 1px solid #00ff9f;
    color: #00ff9f;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s;
}

button:hover {
    background-color: rgba(0, 255, 159, 0.2);
    box-shadow: 0 0 15px #00ff9f;
}

.error {
    color: #ff0066;
    text-shadow: 0 0 5px #ff0066;
}

span.error {
    display: block;
    margin-top: 0.5rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Form Grid Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.form-grid > div {
    display: flex;
    flex-direction: column;
}

/* Cyberpunk Dropdown Styles */
select {
    padding: 0.75rem;
    background-color: rgba(0, 255, 159, 0.1);
    border: 1px solid #00ff9f;
    color: #00ff9f;
    width: 100%;
    font-family: 'Courier New', monospace;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300ff9f' 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 0.75rem center;
    background-size: 16px;
    position: relative;
    z-index: 1;
}

select:focus {
    outline: none;
    box-shadow: 0 0 10px #00ff9f;
}

select option {
    background-color: #0a0a0a;
    color: #00ff9f;
}

/* Enhanced Cyberpunk Dropdown */
.cyber-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
}

.cyber-dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid #00ff9f;
    border-radius: 3px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.7;
}

.cyber-dropdown::after {
    content: '▼';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #00ff9f;
    pointer-events: none;
    z-index: 1;
    font-size: 0.8rem;
}

.cyber-dropdown select {
    background-image: none;
    padding-right: 2.5rem;
}

.cyber-dropdown select:focus {
    box-shadow: 0 0 15px #00ff9f, inset 0 0 10px rgba(0, 255, 159, 0.2);
}

/* Ghost in the Shell inspired dropdown */
.ghost-dropdown {
    position: relative;
    width: 100%;
}

.ghost-dropdown select {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00aaff;
    color: #00aaff;
    text-shadow: 0 0 5px #00aaff;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
    transition: all 0.3s ease;
}

.ghost-dropdown select:focus {
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.7);
    background: rgba(0, 10, 20, 0.9);
}

.ghost-dropdown::before {
    content: '⇣';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #00aaff;
    pointer-events: none;
    z-index: 2;
    font-size: 1.2rem;
    text-shadow: 0 0 5px #00aaff;
}

.ghost-dropdown:hover::before {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.ghost-dropdown:hover select {
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

/* Ghost in the Shell status panels */
.ghost-status-panel {
    padding: 1rem;
    background: rgba(0, 20, 40, 0.6);
    border: 1px solid #00aaff;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.ghost-status-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 170, 255, 0.1), transparent);
    transition: left 0.5s;
}

.ghost-status-panel:hover::before {
    left: 100%;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ghost-pulse {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    position: relative;
}

.ghost-pulse.healthy {
    background-color: #00ff9f;
    box-shadow: 0 0 10px #00ff9f;
    animation: pulse 2s infinite;
}

.ghost-pulse.error {
    background-color: #ff0066;
    box-shadow: 0 0 10px #ff0066;
    animation: pulse-error 1s infinite;
}

.status-text {
    font-weight: bold;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-text.healthy {
    color: #00ff9f;
    text-shadow: 0 0 10px #00ff9f;
}

.status-text.error {
    color: #ff0066;
    text-shadow: 0 0 10px #ff0066;
}

.error-panel {
    background-color: rgba(255, 0, 102, 0.1);
    color: #ff0066;
    padding: 1rem;
    border: 1px solid #ff0066;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px #ff0066;
}

.success-message {
    color: #00ff9f;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px #00ff9f;
    font-weight: bold;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 159, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 255, 159, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 159, 0);
    }
}

@keyframes pulse-error {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 0, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 102, 0);
    }
}

/* Cyberpunk Fieldset Styles */
.cyber-fieldset {
    border: 1px solid #00ff9f;
    border-radius: 5px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(0, 255, 159, 0.05);
    position: relative;
}

.cyber-fieldset::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid #00ff9f;
    border-radius: 5px;
    pointer-events: none;
    opacity: 0.5;
}

.cyber-legend {
    color: #00ff9f;
    font-weight: bold;
    padding: 0 1rem;
    font-size: 1.2rem;
    text-shadow: 0 0 5px #00ff9f;
}

/* Sortable Header Styles */
.sortable-header {
    color: #00ff9f;
    text-decoration: none;
    display: block;
    padding: 0.75rem;
    position: relative;
    transition: all 0.3s ease;
}

.sortable-header:hover {
    background-color: rgba(0, 255, 159, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 159, 0.5);
}

.sorted-asc, .sorted-desc {
    background-color: rgba(0, 255, 159, 0.3);
    text-shadow: 0 0 5px #00ff9f;
}

.sortable-header::after {
    content: '↕';
    margin-left: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.sorted-asc::after {
    content: '↑';
    opacity: 1;
    text-shadow: 0 0 5px #00ff9f;
}

.sorted-desc::after {
    content: '↓';
    opacity: 1;
    text-shadow: 0 0 5px #00ff9f;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 0;
    text-align: left;
    border-bottom: 1px solid rgba(0, 255, 159, 0.3);
}

.table th > a {
    padding: 0.75rem;
    display: block;
}

.table th {
    background-color: rgba(0, 255, 159, 0.1);
    color: #00ff9f;
    font-weight: bold;
    position: relative;
}

.table tr:hover {
    background-color: rgba(0, 255, 159, 0.05);
}

/* HTMX Swap Animation */
#resellers-tbody {
    transition: opacity 0.3s ease;
}

.htmx-swapping {
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.htmx-added {
    opacity: 0;
}

.htmx-indicator {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

.reseller-row {
    transition: all 0.3s ease;
}

/* Container Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Checkbox Styles */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    appearance: none;
    background-color: rgba(0, 255, 159, 0.1);
    border: 1px solid #00ff9f;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-color: rgba(0, 255, 159, 0.3);
}

input[type="checkbox"]:checked::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00ff9f;
    font-weight: bold;
    font-size: 14px;
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 5px #00ff9f;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

/* Terminal Button Styles */
.terminal-button {
    display: inline-block;
    background-color: #000;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border: 1px solid #00ff41;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    text-shadow: 0 0 5px #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    transition: all 0.3s ease;
}

.terminal-button::before {
    content: '>';
    display: inline-block;
    margin-right: 0.5rem;
    animation: blink 1s infinite;
}

.terminal-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.4), transparent);
    transition: left 0.5s;
}

.terminal-button:hover {
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.7);
    text-shadow: 0 0 10px #00ff41;
    background-color: rgba(0, 255, 65, 0.1);
}

.terminal-button:hover::after {
    left: 100%;
}

.terminal-button:hover::before {
    animation: none;
    opacity: 1;
}

/* Scan line effect on hover */
.terminal-button .scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ff41, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.terminal-button:hover .scan-line {
    opacity: 1;
    animation: scan 0.5s linear;
}

/* Link Styles */
a {
    color: #00ff9f;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-shadow: 0 0 5px #00ff9f;
}

/* Form Grid Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.form-grid > div {
    display: flex;
    flex-direction: column;
}
