:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.3);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

/* Inputs & Forms Global Styling */
input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Auth Forms */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.auth-container h2 {
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.auth-container input {
    margin-bottom: 1.25rem;
}

.auth-container button {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: background-color 0.2s;
    font-size: 1rem;
}

.auth-container button:hover {
    background: var(--primary-hover);
}

.auth-container a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-container a:hover {
    text-decoration: underline;
}

/* Upload Area */
.container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.upload-area {
    background-color: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    padding: 4rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
}

.icon-container {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.icon-container svg {
    width: 64px;
    height: 64px;
}

/* Progress & Result */
.progress-container, .result-container {
    margin-top: 2rem;
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.progress-bar {
    height: 8px;
    background-color: var(--bg-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), #c084fc);
    width: 0%;
    transition: width 0.3s ease;
}

.link-box {
    display: flex;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem;
    margin: 1.5rem 0;
}

.link-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem;
    outline: none;
    font-family: monospace;
    margin-bottom: 0; /* Override global input margin */
}

.link-box input:focus {
    box-shadow: none; /* Remove glow inside link box */
    border-color: transparent;
}

.link-box button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: 600;
}

.upload-more-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-more-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-main);
}

/* Admin Dashboard */
.admin-dashboard {
    max-width: 1000px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card p {
    font-size: 2rem;
    font-weight: 700;
}

.table-container {
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

td {
    font-size: 0.9rem;
}

tr:last-child td {
    border-bottom: none;
}

.delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 0.35rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.2s;
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-color);
    transition: .4s;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(26px);
    background-color: white;
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* File Viewer Styles */
.viewer-container {
    max-width: 900px;
    margin: 2rem auto;
    text-align: center;
}

.file-preview {
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 2rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.file-preview img, .file-preview video {
    max-width: 100%;
    max-height: 600px;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.code-preview {
    width: 100%;
    max-height: 600px;
    overflow: auto;
    text-align: left;
    background: #282c34;
    padding: 1rem;
    border-radius: 0.5rem;
}

.code-preview pre { margin: 0; }
.code-preview code { font-family: 'Fira Code', monospace; font-size: 0.9rem; }

.file-info-card {
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    padding: 2rem;
}

.file-info-card h2 { margin-bottom: 1rem; word-break: break-all; }
.meta-info { color: var(--text-muted); margin-bottom: 2rem; }
.highlight { color: var(--primary); font-weight: 600; }
.action-buttons { display: flex; justify-content: center; gap: 1rem; }

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    font-size: 0.95rem;
}

.primary-btn { background: var(--primary); color: white; }
.primary-btn:hover { background: var(--primary-hover); }
.secondary-btn { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.secondary-btn:hover { border-color: var(--text-muted); }

.danger-btn {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}
.danger-btn:hover {
    background: var(--danger);
    color: white;
}

/* Settings & Discord Embed Preview */
.settings-container {
    max-width: 900px;
    margin: 0 auto;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .settings-grid { grid-template-columns: 1fr; }
}

.settings-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.settings-form h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-muted); font-weight: 500; }

.form-group small { display: block; margin-top: 0.25rem; font-size: 0.8rem; color: var(--text-muted); }

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-color);
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}

.color-picker-wrapper input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.checkbox-group label { margin-bottom: 0; cursor: pointer; }
.checkbox-group input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

/* Fake Discord Embed */
.discord-embed {
    background: #2f3136;
    border-left: 4px solid #202225;
    border-radius: 4px;
    padding: 0.8rem 1rem;
    max-width: 400px;
    display: flex;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.embed-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #6366f1; /* Default */
    border-radius: 4px 0 0 4px;
}

.embed-content {
    margin-left: 0.5rem;
    width: 100%;
}

.embed-provider {
    font-size: 0.75rem;
    color: #b9bbbe;
    margin-bottom: 0.25rem;
}

.embed-title {
    font-size: 1rem;
    font-weight: 600;
    color: #00b0f4;
    margin-bottom: 0.5rem;
}

.embed-desc {
    font-size: 0.875rem;
    color: #dcddde;
    margin-bottom: 0.5rem;
}

.embed-image-placeholder {
    width: 100%;
    height: 150px;
    background: #202225;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.embed-footer {
    font-size: 0.75rem;
    color: #b9bbbe;
}

/* Mod Actions */
.mod-actions {
    display: flex;
    gap: 0.5rem;
}

.mod-btn {
    padding: 0.35rem 0.75rem;
    border-radius: 0.35rem;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    color: white;
    font-weight: 600;
}

.btn-dismiss { background: var(--text-muted); }
.btn-delete { background: var(--danger); }
.btn-ban { background: #7f1d1d; }
