/* Admin-specific styles */

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: 
        linear-gradient(180deg, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="%23111" width="50" height="50"/><rect fill="%23151515" x="50" width="50" height="50"/><rect fill="%23151515" y="50" width="50" height="50"/><rect fill="%23111" x="50" y="50" width="50" height="50"/></svg>');
    background-size: cover, 20px 20px;
}

.login-box {
    background: var(--gray-dark);
    border: 4px solid var(--red-primary);
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 
        0 8px 0 var(--red-dark),
        var(--shadow-red);
    animation: fadeInUp 0.6s ease-out;
}

.login-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: 4px 4px 0 var(--red-dark);
}

.login-subtitle {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.7rem;
    color: var(--red-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.minecraft-input {
    font-family: 'Press Start 2P', cursive;
    width: 100%;
    padding: 1rem;
    font-size: 0.8rem;
    background: var(--gray-medium);
    border: 2px solid var(--gray-light);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s;
}

.minecraft-input:focus {
    border-color: var(--red-primary);
    box-shadow: inset 0 0 20px var(--red-glow);
}

textarea.minecraft-input {
    resize: vertical;
    min-height: 100px;
    font-size: 0.7rem;
    line-height: 1.6;
}

/* Admin Dashboard */
.admin-dashboard {
    padding: 8rem 2rem 4rem;
    min-height: 100vh;
    background: var(--darker-bg);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.admin-section {
    grid-column: span 1;
}

.admin-section.full-width {
    grid-column: span 2;
}

.admin-section-title {
    font-size: 1.2rem;
    color: var(--red-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-shadow: 2px 2px 0 var(--red-dark);
}

.section-icon {
    font-size: 1.5rem;
}

.admin-card {
    background: var(--gray-dark);
    border: 4px solid var(--gray-light);
    padding: 2rem;
    transition: all 0.3s;
}

.admin-card:hover {
    border-color: var(--red-primary);
    box-shadow: inset 0 0 20px rgba(255, 51, 51, 0.1);
}

/* Items List */
.items-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.item-card {
    background: var(--gray-medium);
    border: 2px solid var(--gray-light);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s;
}

.item-card:hover {
    border-color: var(--red-primary);
}

.item-content {
    flex: 1;
}

.item-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.item-title {
    font-size: 0.9rem;
    color: var(--red-primary);
    margin-bottom: 0.5rem;
}

.item-description {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.minecraft-button.small {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
}

.minecraft-button.danger {
    background: linear-gradient(180deg, #cc0000 0%, #8b0000 100%);
    box-shadow: 
        0 4px 0 #660000,
        0 0 0 2px #cc0000;
}

.minecraft-button.danger:hover {
    box-shadow: 
        0 2px 0 #660000,
        0 0 0 2px #cc0000;
}

/* Gallery Items */
.gallery-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item-admin {
    position: relative;
    aspect-ratio: 16/9;
    border: 2px solid var(--gray-light);
    overflow: hidden;
    transition: all 0.3s;
}

.gallery-item-admin:hover {
    border-color: var(--red-primary);
}

.gallery-item-admin img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-item-title {
    font-size: 0.6rem;
    color: var(--text-primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

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

.modal-content {
    background: var(--gray-dark);
    border: 4px solid var(--red-primary);
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-red);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--red-primary);
}

.modal-title {
    font-size: 1.2rem;
    color: var(--red-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s;
}

.modal-close:hover {
    color: var(--red-primary);
    transform: rotate(90deg);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.loading::after {
    content: '...';
    animation: loadingDots 1.5s steps(3, end) infinite;
}

@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-dark);
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-section,
    .admin-section.full-width {
        grid-column: span 1;
    }

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

    .item-card {
        flex-direction: column;
    }

    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .login-box {
        padding: 2rem 1rem;
    }

    .modal-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .minecraft-button.large {
        font-size: 0.8rem;
        padding: 1rem 2rem;
    }

    .admin-section-title {
        font-size: 1rem;
    }

    .section-icon {
        font-size: 1.2rem;
    }
}
