:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #e2e8f0;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Auth & User UI */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.auth-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 400px;
    border: 1px solid #475569;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-card h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid #475569;
}

.wallet-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 0.85rem;
}

.badge-admin {
    background: #f59e0b;
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.375rem;
    padding: 0.75rem 1.5rem;
    width: 100%;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-outline-sm {
    background: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-outline-sm:hover {
    border-color: var(--primary);
    color: white;
}

/* Dashboard Views */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input,
select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem;
    background: var(--card-bg);
    border: 1px solid #475569;
    border-radius: 0.375rem;
    color: white;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.file-drop-area {
    border: 2px dashed #475569;
    background: var(--card-bg);
    padding: 2rem;
    text-align: center;
    border-radius: 0.5rem;
    cursor: pointer;
}

.file-drop-area input[type="file"] {
    display: none;
}

.file-drop-area.drag-over {
    border-color: var(--primary);
    background: #0f172a;
}

/* History Section */
.history-section {
    margin-top: 3rem;
    border-top: 1px solid #475569;
    padding-top: 2rem;
}

.history-grid {
    display: grid;
    gap: 1rem;
}

.history-item {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-info h4 {
    margin: 0;
}

.history-info p {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Admin Dashboard */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #334155;
    white-space: nowrap;
}

.admin-grid {
    overflow-x: visible;
}

.admin-grid.scrollable {
    overflow-x: auto;
}

.admin-grid.scrollable .admin-table {
    min-width: 1400px;
    font-size: 0.75rem;
}

.btn-edit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 0.375rem;
    cursor: pointer;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    width: 320px;
    border: 1px solid #475569;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.actions-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-primary-sm {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
}

.status-box {
    background: #000;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
}

.hidden {
    display: none;
}

.maintenance-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3000;
    background: #f59e0b;
    color: #0f172a;
    text-align: center;
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    border-bottom: 1px solid #b45309;
}

/* Legal pages */
.legal-page {
    max-width: 900px;
}

.legal-page header {
    text-align: left;
    margin-bottom: 2rem;
}

.legal-page .meta {
    color: #94a3b8;
    margin-top: 0.5rem;
}

.legal-page h2 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.legal-page p {
    line-height: 1.6;
    color: #cbd5f5;
}

.legal-page a {
    color: var(--primary);
    text-decoration: none;
}

.legal-page a:hover {
    text-decoration: underline;
}

.legal-page .back-link {
    font-size: 0.9rem;
}

/* Video Player in History */
.history-media {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.history-media video {
    width: 400px;
    height: 200px;
    object-fit: contain;
    border-radius: 0.375rem;
    background: #000;
    border: 1px solid #475569;
}

.download-link {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.download-link:hover {
    text-decoration: underline;
}

.btn-view {
    background: #6366f1;
    /* Indigo - premium look, similar to blue but distinct */
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    font-size: 0.8rem;
}

.btn-view:hover {
    background: #4f46e5;
}

.site-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

.site-footer a {
    color: #94a3b8;
    text-decoration: none;
}

.site-footer a:hover {
    color: #e2e8f0;
}

.footer-sep {
    margin: 0 0.5rem;
    color: #475569;
}

/* Payment page */
.payment-page header {
    text-align: left;
    margin-bottom: 2rem;
}

.payment-options {
    display: grid;
    gap: 1rem;
}

.payment-card {
    background: var(--card-bg);
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: left;
    cursor: pointer;
    color: var(--text-color);
    transition: border-color 0.2s, transform 0.2s;
}

.payment-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.payment-card.loading {
    opacity: 0.7;
    cursor: wait;
}

.payment-card h2 {
    margin: 0 0 0.5rem 0;
}

.payment-card .price {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.payment-card .note {
    color: #94a3b8;
    margin: 0;
    font-size: 0.9rem;
}

.payment-auth {
    background: var(--card-bg);
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
}
