/* Base Styles */
body {
    background-image: url('/assets/tiles.gif');
    background-repeat: repeat;
    color: #39FF14;
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 2em;
    text-align: center;
}

h1, h2, h3 {
    text-shadow: 0 0 5px #39FF14;
}

/* General Components */
.page-title {
    font-size: 2.5em;
    margin-bottom: 0.2em;
}

.page-title.large {
    font-size: 3em;
}

.card {
    max-width: 600px;
    margin: 2em auto;
    background: #181818;
    border: 1px solid #39FF14;
    padding: 1em;
}

.card.transparent {
    background: transparent;
    border: none;
    padding: 0;
}

.card.narrow {
    max-width: 500px;
}

.text-center {
    text-align: center;
}

.form-input {
    background: #000;
    color: #39FF14;
    border: 1px solid #39FF14;
    padding: 0.5em;
    font-family: 'Courier New', monospace;
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #39FF14;
    box-shadow: 0 0 10px #39FF14;
    background-color: #111;
}

textarea.form-input {
    height: 6em;
    resize: vertical;
    transition: all 0.2s ease-in-out;
}

.btn {
    background: #39FF14;
    color: #000;
    border: none;
    padding: 0.5em 1.5em;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 0 10px #39FF14;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.2s ease-in-out;
    display: inline-block;
    text-decoration: none;
}

.btn:hover {
    background: #000;
    color: #39FF14;
    box-shadow: 0 0 20px #39FF14;
}

.btn.danger {
    background: #ff4444;
    box-shadow: 0 0 10px #ff4444;
}

.btn.danger:hover {
    background: #000;
    color: #ff4444;
    box-shadow: 0 0 15px #ff4444;
}

.btn.primary {
    background: #3399ff;
    box-shadow: 0 0 10px #3399ff;
}

.btn.primary:hover {
    background: #000;
    color: #3399ff;
    box-shadow: 0 0 15px #3399ff;
}

.btn.accent {
    background: #aa5c00;
    box-shadow: 0 0 10px #aa5c00;
}

.btn.accent:hover {
    background: #000;
    color: #aa5c00;
    box-shadow: 0 0 15px #aa5c00;
}

.btn.neon {
    background: #aa5c00;
    border: 2px solid #aa5c00;
    color: #000;
    padding: 0.5em 2em;
    margin-top: 1em;
    font-size: 1em;
    box-shadow: 0 0 10px #aa5c00, 0 0 20px #aa5c00, inset 0 0 20px #aa5c00;
}

.btn.neon:hover {
    background: #000;
    color: #aa5c00;
    box-shadow: 0 0 10px #aa5c00, 0 0 30px #aa5c00;
}

.btn.outline {
    background: transparent;
    border: 2px solid #aa5c00;
    color: #aa5c00;
    padding: 0.3em 1.2em;
    font-size: 0.85em;
}

.btn.outline:hover {
    background: #aa5c00;
    color: #111;
    box-shadow: 0 0 8px #aa5c00;
}

.btn.outline.green {
    border-color: #39FF14;
    color: #39FF14;
}

.btn.outline.green:hover {
    background: #39FF14;
    color: #111;
    box-shadow: 0 0 8px #39FF14;
}

.action-link {
    color: #aa5c00;
    text-decoration: underline;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85em;
    cursor: pointer;
}

.action-link:hover {
    color: #ffb347;
}

.data-table {
    width: 60%;
    max-width: 1100px;
    border-collapse: collapse;
    margin: 2em auto 0 auto;
}

.data-table th,
.data-table td {
    padding: 0.5em;
    border: 1px solid #39FF14;
    text-align: left;
}

.data-table th {
    background: #181818;
}

.data-table tr:nth-child(even) {
    background: #111;
}

.message {
    max-width: 600px;
    margin: 1em auto;
    text-align: center;
}

.message.error {
    color: #ff4444;
    font-weight: bold;
}

.message.success {
    color: #39FF14;
    font-weight: bold;
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 2em;
    margin: 2em 0;
    flex-wrap: wrap;
}

.stat-card {
    background: #181818;
    border: 2px solid #39FF14;
    padding: 1.5em;
    min-width: 200px;
    box-shadow: 0 0 10px #39FF14;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card .number {
    font-size: 2.5em;
    font-weight: bold;
    color: #39FF14;
    text-shadow: 0 0 8px #39FF14;
}

.stat-card .label {
    font-size: 1.1em;
    color: #aa5c00;
    margin-top: 0.5em;
}

.chart-container {
    background: #111;
    border: 2px solid #39FF14;
    margin: 2em auto;
    padding: 2em;
    max-width: 1000px;
    position: relative;
}

.info-panel {
    background: #181818;
    border: 1px dashed #39FF14;
    padding: 1.5em;
    margin: 2em auto;
    max-width: 800px;
    text-align: left;
}

.horizontal-section {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 2em;
    margin: 3em 0;
    flex-wrap: wrap;
}

/* Home Page Specific (keep only truly unique styles) */
.big-link {
    font-size: 2.5em;
    font-weight: bold;
    color: #aa5c00;
    text-shadow: 0 0 8px #aa5c00;
}

.fella-container {
    width: 60%;
    min-width: 400px;
    max-width: 1100px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    height: 100px;
}

.fella-dance {
    position: absolute;
    height: 100px;
}

@keyframes fellaSlide {
    0% { left: -150px; }
    100% { left: 1100px; }
}

/* User Content Specific */
.filename-cell {
    position: relative;
}

.preview-tooltip {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    background: #111;
    border: 1px solid #39FF14;
    padding: 0.5em;
    min-width: 200px;
    max-width: 320px;
    z-index: 5;
    display: none;
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
}

.preview-tooltip img,
.preview-tooltip video,
.preview-tooltip audio {
    max-width: 300px;
    max-height: 200px;
    display: block;
}

.preview-trigger:hover + .preview-tooltip,
.preview-tooltip:hover {
    display: block;
}

.actions-cell {
    position: relative;
}

.rename-popup {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #111;
    border: 1px solid #39FF14;
    padding: 0.75em;
    border-radius: 4px;
    width: 260px;
    display: none;
    z-index: 6;
}

.rename-popup.open {
    display: block;
}

.rename-popup .rename-input {
    width: 100%;
    margin-top: 0.4em;
}

.rename-popup-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4em;
    margin-top: 0.4em;
}

.rename-popup .auth-textlink {
    text-decoration: none;
}

.rename-divider {
    color: #39FF14;
    opacity: 0.8;
}

.upload-meta {
    max-width: 600px;
    margin: 0.75em auto 0;
    font-size: 0.9em;
    line-height: 1.4;
    color: #b8ff99;
}

/* General Layout */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2em;
    flex-wrap: wrap;
    gap: 1em;
}

.title-row {
    width: 60%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    column-gap: 1em;
}

.title-row h1 {
    margin: 0;
    justify-self: center;
}

.title-left {
    justify-self: start;
    text-align: left;
}

.auth-right {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.9em;
    flex-wrap: wrap;
}

#auth-buttons {
    white-space: nowrap;
}

#auth-buttons a {
    margin-left: 1em;
}

.auth-textlink {
    color: #aa5c00;
    text-decoration: underline;
    font-size: 0.95em;
}

.auth-textlink:hover {
    color: #ffb347;
}

.user-info {
    color: #39FF14;
    font-size: 0.95em;
}

hr, .hr-line {
    border: none;
    height: 2px;
    background: #39FF14;
    width: 60%;
    margin: 1em auto;
}

.dino-dark {
    filter: invert(1) hue-rotate(180deg) brightness(0.9);
}

.hidden {
    display: none !important;
}

.blinker {
    animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
    to { visibility: hidden; }
}

footer {
    margin-top: 4em;
    font-size: 0.9em;
    opacity: 0.6;
}

@media (max-width: 640px) {
    .title-row {
        width: 95%;
        grid-template-columns: 1fr;
        row-gap: 0.4em;
    }
    .auth-right {
        justify-self: center;
        justify-content: center;
    }
    hr, .hr-line {
        width: 95%;
    }
    .data-table {
        width: 95%;
    }
}