:root {
    --bg-dark: #0a0a12;
    --bg-card: #14141f;
    --primary: #7000ff;
    --accent: #00f3ff;
    --text-main: #ffffff;
    --text-muted: #8b8b9e;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --radius: 16px;
    --font: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

.app-container {
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 18, 0.8);
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.dot {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.coin-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.add-coins-btn {
    background: var(--primary);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Views */
.view {
    flex: 1;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 100%;
    transition: opacity 0.3s ease;
}

.view.active {
    opacity: 1;
    pointer-events: all;
    position: relative;
}

.hidden {
    display: none !important;
}

/* Landing Page */
.hero {
    padding: 60px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.hero h1 {
    font-size: 48px;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero p {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 500px;
    margin-bottom: 40px;
}

.gradient-text {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-btn {
    background: linear-gradient(135deg, var(--primary), #5a00d1);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 10px 30px rgba(112, 0, 255, 0.3);
}

.cta-btn:active {
    transform: scale(0.98);
}

/* Dashboard */
.container {
    padding: 24px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.create-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 40px;
}

.create-card h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

.upload-zone {
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--primary);
}

.upload-placeholder .icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.upload-placeholder p {
    color: var(--text-muted);
}

#image-preview {
    max-width: 100%;
    border-radius: 8px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

textarea {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    color: white;
    resize: none;
    height: 100px;
    font-size: 16px;
    margin-bottom: 24px;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.action-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cost-info {
    color: var(--text-muted);
    font-size: 14px;
}

.cost-info span {
    color: var(--accent);
    font-weight: 600;
}

.generate-btn {
    background: white;
    color: black;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
}

/* Request List */
.request-grid {
    display: grid;
    gap: 16px;
}

.request-card {
    background: var(--glass);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.req-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background: #2a2a35;
}

.req-info {
    flex: 1;
}

.req-status {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
}

.status-pending {
    background: #333;
    color: #aaa;
}

.status-completed {
    background: rgba(0, 243, 255, 0.2);
    color: var(--accent);
}

.req-prompt {
    font-size: 14px;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.download-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    display: inline-block;
}

/* Admin */
/* Admin Dashboard */
.navbar-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-tabs {
    display: flex;
    gap: 12px;
    background: var(--bg-card);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

.tab-btn:hover:not(.active) {
    color: white;
}

.admin-tab-content.hidden {
    display: none !important;
}

/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: 16px;
    text-align: center;
}

.stat-card h4 {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.data-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: 600;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.user-status-online {
    color: #00ff88;
    font-weight: bold;
}

.user-status-offline {
    color: #666;
}

.admin-list .request-card {
    flex-direction: column;
    align-items: flex-start;
}

.admin-actions {
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 24px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    border: 1px solid var(--glass-border);
}

.nav-link {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    z-index: 2000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 20px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Enhanced Interactivity */
.create-card,
.stat-card,
.request-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    /* Inner Glow */
}

.create-card:hover,
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Nav Link Hover */
.nav-link {
    transition: color 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    color: white;
}

/* Staggered Animation for Dashboard */
.view.active .create-card {
    animation: fadeUp 0.6s ease forwards;
}

.view.active .history-section {
    animation: fadeUp 0.6s ease 0.2s forwards;
    /* Delay 0.2s */
    opacity: 0;
    /* Only visible after animation starts */
}

/* Primary Button Glow */
.generate-btn {
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}