* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.nav {
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #fff;
}

/* Buttons */
.btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    background: #5855eb;
}

.btn-secondary {
    background: #374151;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.full-width {
    width: 100%;
}

/* Main content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

/* Forms */
.auth-form {
    max-width: 400px;
    margin: 4rem auto;
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #333;
}

.auth-form h1 {
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #ccc;
}

.form-input {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #333;
    padding: 0.75rem;
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: #999;
}

.auth-switch a {
    color: #6366f1;
    text-decoration: none;
}

/* Upload */
.upload-section {
    max-width: 600px;
    margin: 0 auto;
}

.upload-form {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #333;
}

.upload-area {
    border: 2px dashed #333;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 2rem;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.upload-icon {
    font-size: 3rem;
    color: #666;
    margin-bottom: 1rem;
}

.upload-hint {
    color: #999;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

/* Gallery */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.image-card {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
    transition: transform 0.2s;
}

.image-card:hover {
    transform: translateY(-2px);
}

.image-preview {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.image-info {
    padding: 1rem;
}

.image-name {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.image-meta {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 1rem;
}

.image-actions {
    display: flex;
    gap: 0.5rem;
}

.copy-btn {
    background: #374151;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.copy-btn:hover {
    background: #4b5563;
}

.empty-state {
    text-align: center;
    margin: 4rem 0;
    color: #999;
}

.empty-state h3 {
    margin-bottom: 1rem;
}

.empty-state a {
    color: #6366f1;
    text-decoration: none;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    background: #374151;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
}

.page-btn:hover {
    background: #4b5563;
}

.page-btn.active {
    background: #6366f1;
}

/* Admin */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #333;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #6366f1;
}

.stat-label {
    color: #999;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.admin-tables {
    display: grid;
    gap: 2rem;
}

.admin-section h3 {
    margin-bottom: 1rem;
}

.table {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
}

.table table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #333;
}

.table th {
    background: #0a0a0a;
    font-weight: 600;
}

.table tr:last-child td {
    border-bottom: none;
}

.monospace {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.status.used {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.status.available {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

/* Messages */
.error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.success {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .nav-links {
        gap: 1rem;
    }

    .container {
        padding: 0 15px;
    }

    .gallery-header,
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .admin-tables {
        grid-template-columns: 1fr;
    }
}
/* Image Viewer */
.image-viewer {
    max-width: 1000px;
    margin: 0 auto;
}

.image-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.image-display {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    border: 1px solid #333;
}

.full-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
}

.image-details {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #333;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #0a0a0a;
    border-radius: 6px;
    border: 1px solid #333;
}

.detail-label {
    color: #999;
    font-weight: 500;
}

.detail-value {
    color: #fff;
}

@media (max-width: 768px) {
    .image-header {
        flex-direction: column;
        align-items: stretch;
    }

    .image-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* ShareX Config */
.config-header {
    text-align: center;
    margin-bottom: 3rem;
}

.config-header p {
    color: #999;
    margin-top: 0.5rem;
}

.config-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.config-form,
.config-preview {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #333;
}

.config-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.config-note {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1.5rem;
    color: #ef4444;
}

.config-info {
    margin-top: 2rem;
    padding: 1rem;
    background: #0a0a0a;
    border-radius: 6px;
    border: 1px solid #333;
}

.config-info h4 {
    margin-bottom: 0.5rem;
    color: #6366f1;
}

.config-info ul {
    margin-left: 1rem;
}

.config-info li {
    color: #999;
    margin-bottom: 0.25rem;
}

.config-preview ol {
    margin-left: 1rem;
}

.config-preview li {
    color: #999;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .config-section {
        grid-template-columns: 1fr;
    }

    .config-actions {
        flex-direction: column;
    }
}