:root {
    --yellow: #FFE500;
    --black: #000000;
    --white: #FFFFFF;
    --gray-light: #F5F5F5;
    --gray: #888888;
    --gray-dark: #333333;
    --red: #FF4136;
    --green: #2ECC40;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--white);
    color: var(--black);
    line-height: 1.5;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--black);
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--black);
    color: var(--yellow);
}

.btn-primary:hover {
    background-color: var(--gray-dark);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--black);
}

.btn-secondary:hover {
    background-color: var(--gray-light);
}

.btn-danger {
    background-color: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border: 2px solid var(--black);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(255, 229, 0, 0.3);
}

/* Login Screen */
#login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--black);
}

.login-container {
    background-color: var(--white);
    padding: 48px;
    width: 100%;
    max-width: 400px;
    border: 4px solid var(--yellow);
}

.logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 4px;
}

.admin-badge {
    display: inline-block;
    background-color: var(--yellow);
    color: var(--black);
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-top: 8px;
}

.error-message {
    color: var(--red);
    font-size: 14px;
    margin-top: 16px;
    text-align: center;
}

/* Dashboard Layout */
#dashboard-screen {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--black);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-dark);
}

.sidebar-header h1 {
    font-size: 24px;
    letter-spacing: 2px;
}

.sidebar-header .admin-badge {
    margin-top: 8px;
}

.nav-menu {
    list-style: none;
    padding: 24px 0;
    flex: 1;
}

.nav-item {
    padding: 14px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s;
}

.nav-item:hover {
    background-color: var(--gray-dark);
}

.nav-item.active {
    background-color: var(--yellow);
    color: var(--black);
}

.nav-icon {
    font-size: 8px;
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--gray-dark);
}

.admin-info {
    margin-bottom: 16px;
}

.admin-info span {
    display: block;
}

#admin-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.role-badge {
    font-size: 12px;
    color: var(--yellow);
    text-transform: uppercase;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
}

.section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section h2 {
    font-size: 28px;
    font-weight: 700;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.stat-card {
    background-color: var(--gray-light);
    padding: 24px;
    border: 2px solid var(--black);
}

.stat-card h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 12px;
}

.search-box input {
    width: 300px;
    padding: 12px;
    border: 2px solid var(--black);
    font-size: 14px;
    font-family: inherit;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid var(--black);
}

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

th {
    background-color: var(--black);
    color: var(--white);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

tr:hover {
    background-color: var(--gray-light);
}

.verified-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
}

.verified-badge.yes {
    background-color: var(--green);
    color: var(--white);
}

.verified-badge.no {
    background-color: var(--gray);
    color: var(--white);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    padding: 8px 16px;
    border: 2px solid var(--black);
    background-color: var(--white);
    cursor: pointer;
    font-family: inherit;
}

.pagination button:hover {
    background-color: var(--gray-light);
}

.pagination button.active {
    background-color: var(--black);
    color: var(--yellow);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--white);
    width: 100%;
    max-width: 500px;
    border: 4px solid var(--black);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid var(--black);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 2px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Info Box */
.info-box {
    background-color: var(--yellow);
    padding: 16px;
    margin-bottom: 16px;
}

.info-box p {
    font-weight: 600;
}

.info-box .temp-password {
    font-family: monospace;
    font-size: 18px;
    background-color: var(--black);
    color: var(--yellow);
    padding: 8px 12px;
    margin-top: 8px;
    display: inline-block;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-controls select {
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid var(--black);
    font-family: inherit;
    background-color: var(--white);
    cursor: pointer;
    min-width: 200px;
}

.filter-controls select:focus {
    outline: none;
    border-color: var(--yellow);
}

/* Images Stats Bar */
.images-stats {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    background-color: var(--gray-light);
    border: 2px solid var(--black);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.images-stats span {
    font-size: 14px;
    color: var(--gray-dark);
}

.images-stats strong {
    color: var(--black);
}

/* Images Grid */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.image-card {
    border: 2px solid var(--black);
    background-color: var(--white);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.image-card:hover {
    transform: translateY(-4px);
    box-shadow: 4px 4px 0 var(--black);
}

.image-container {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background-color: var(--gray-light);
    overflow: hidden;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: var(--gray-light);
}

.image-container .img-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-light);
    color: var(--gray);
    font-size: 12px;
}

.image-info {
    padding: 12px;
}

.image-user {
    margin-bottom: 8px;
}

.image-user .username {
    font-weight: 600;
    font-size: 14px;
    color: var(--black);
}

.image-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 12px;
}

.image-meta .likes {
    font-weight: 500;
}

.image-actions {
    display: flex;
    gap: 8px;
}

/* Loading and states */
.loading, .no-results, .error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px;
    font-size: 16px;
    color: var(--gray);
}

.error {
    color: var(--red);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
    }

    #dashboard-screen {
        flex-direction: column;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box input {
        width: 100%;
    }

    .section-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .images-stats {
        gap: 16px;
    }
}
