/* admin.css */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700;900&display=swap');

/* Dynamic Gradient Background */
.admin-page {
    background: linear-gradient(-45deg, #050505, #1a0b2e, #0f0f1a, #2a0845);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #fff;
    min-height: 100vh;
    padding: 6rem 2rem 2rem;
    font-family: 'Space Grotesk', sans-serif;
    position: relative;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.admin-section {
    display: none;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.admin-section.active {
    display: flex;
}

.admin-title {
    font-size: 3rem;
    font-weight: 900;
    /* Neon Text Gradient */
    background: linear-gradient(90deg, #ff007f, #00f0ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    width: 100%;
    text-align: center;
    letter-spacing: 2px;
}

/* Glassmorphism Containers */
.login-box,
.qr-container,
.photo-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    border-radius: 16px;
}

.login-box {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 450px;
}

.login-box input,
.event-generator input {
    padding: 1.2rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #fff;
    font-size: 1.2rem;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.login-box input:focus,
.event-generator input:focus {
    border-color: #00f0ff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.admin-btn {
    background: linear-gradient(90deg, #ff007f, #E65525);
    color: #fff;
    border: none;
    padding: 1.2rem;
    font-size: 1.2rem;
    font-weight: 900;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 127, 0.3);
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 127, 0.5);
    filter: brightness(1.1);
}

.admin-btn:active {
    transform: translateY(1px);
}

.danger-btn {
    background: transparent;
    border: 1px solid #ff3333;
    color: #ff3333;
    font-size: 1rem;
    box-shadow: none;
    margin-top: 1.5rem;
}

.danger-btn:hover {
    background: rgba(255, 51, 51, 0.1);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.3);
    filter: none;
}

.error-msg {
    color: #ff3333;
    font-size: 1rem;
    text-align: center;
    font-weight: 500;
}

.dashboard-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 4rem;
}

.event-generator {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 650px;
    margin-bottom: 2rem;
}

.event-generator input {
    flex: 1;
}

.qr-container {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem;
    border: 1px dashed rgba(0, 240, 255, 0.5);
    background: rgba(0, 0, 0, 0.6);
}

.qr-container.active {
    display: flex;
}

.qr-container img {
    width: 220px;
    height: 220px;
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.text-link {
    color: #00f0ff;
    text-decoration: none;
    margin-top: 1rem;
    font-weight: bold;
    letter-spacing: 1px;
    transition: color 0.2s;
}

.text-link:hover {
    color: #fff;
    text-shadow: 0 0 10px #00f0ff;
}

.qr-container p {
    color: #ccc;
    font-size: 1.1rem;
}

/* User Management Styles */
.user-management-area {
    width: 100%;
    max-width: 650px;
    margin-bottom: 4rem;
    display: none;
    /* Managed by JS */
    flex-direction: column;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 3rem;
}

.user-creator {
    display: flex;
    gap: 1rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

.user-creator input {
    flex: 1;
    padding: 1.2rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #fff;
    font-size: 1.2rem;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.user-creator input:focus {
    border-color: #00f0ff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1.5rem;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-item-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.user-item-date {
    font-size: 0.9rem;
    color: #aaa;
}

.btn-delete-user {
    background: transparent;
    border: 1px solid #ff3333;
    color: #ff3333;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-delete-user:hover {
    background: #ff3333;
    color: #fff;
}

.moderation-area {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 3rem;
}

.section-subtitle {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 2.5rem;
    font-weight: 700;
    text-align: center;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    width: 100%;
}

.photo-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.photo-card:hover {
    transform: translateY(-5px);
}

.photo-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-actions {
    display: flex;
    width: 100%;
}

.btn-reject,
.btn-approve {
    flex: 1;
    padding: 1.2rem;
    border: none;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    font-family: 'Space Grotesk', sans-serif;
}

.btn-reject {
    background: rgba(255, 51, 51, 0.1);
    color: #ff6b6b;
}

.btn-reject:hover {
    background: #ff3333;
    color: #fff;
}

.btn-approve:hover {
    background: #00f0ff;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

/* Mobile Responsiveness for Admin Panel */
@media (max-width: 768px) {
    .admin-page {
        padding: 7rem 1rem 2rem;
    }

    .admin-title {
        font-size: 2rem;
    }

    .login-box,
    .qr-container {
        padding: 1.5rem;
    }

    .event-generator {
        flex-direction: column;
    }

    .event-generator input,
    .admin-btn {
        width: 100%;
    }

    .photos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .photo-card img {
        height: 250px;
    }

    .photo-actions {
        flex-direction: column;
    }

    .btn-reject,
    .btn-approve {
        padding: 1rem;
    }
}