:root {
    --bg-color: #0f0c29;
    --text-color: #ffffff;
    --accent-color: #7b2cbf;
    --accent-glow: #9d4edd;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success-color: #00b894;
    --error-color: #ff7675;
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Background Animation */
.background-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #30336b;
    bottom: -50px;
    right: -50px;
    animation-delay: 5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 50px);
    }
}

/* Views */
.view-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
    position: absolute;
}

.view-container.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

.view-container.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

/* Login Styles */
.login-card h1 {
    margin-bottom: 10px;
    font-weight: 600;
}

.login-card p {
    margin-bottom: 30px;
    opacity: 0.8;
    font-weight: 300;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    padding: 12px 20px;
    border-radius: 10px;
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--accent-glow);
}

button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

button:hover {
    background: var(--accent-glow);
    transform: translateY(-2px);
}

.error-msg {
    color: var(--error-color);
    margin-top: 15px;
    font-size: 0.9rem;
}

.error-msg.hidden {
    display: none;
}



/* Scrollbar styling */
.attendees-list::-webkit-scrollbar {
    width: 6px;
}

.attendees-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.attendees-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.attendee-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, background 0.3s;
}

.attendee-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.attendee-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.attendee-info p {
    font-size: 0.85rem;
    opacity: 0.6;
}

.validate-btn {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 8px 16px;
    font-size: 0.9rem;
}

.validate-btn:hover {
    background: var(--accent-color);
    color: white;
}

.attendee-card.validated {
    border-color: var(--success-color);
    background: rgba(0, 184, 148, 0.1);
}

.attendee-card.validated .validate-btn {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #30336b;
    bottom: -50px;
    right: -50px;
    animation-delay: 5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 50px);
    }
}

/* Views */
.view-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
    position: absolute;
}

.view-container.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

.view-container.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

/* Login Styles */
.login-card h1 {
    margin-bottom: 10px;
    font-weight: 600;
}

.login-card p {
    margin-bottom: 30px;
    opacity: 0.8;
    font-weight: 300;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    padding: 12px 20px;
    border-radius: 10px;
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--accent-glow);
}

button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

button:hover {
    background: var(--accent-glow);
    transform: translateY(-2px);
}

.error-msg {
    color: var(--error-color);
    margin-top: 15px;
    font-size: 0.9rem;
}

.error-msg.hidden {
    display: none;
}



/* Scrollbar styling */
.attendees-list::-webkit-scrollbar {
    width: 6px;
}

.attendees-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.attendees-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Responsive & Mobile Optimizations */
.header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.header>div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.search-box {
    width: 100%;
}

.search-box input {
    width: 100%;
    font-size: 16px;
    /* Prevent zoom on iOS */
    padding: 15px;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-glow);
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.7;
}

.attendees-list {
    max-height: 60vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 20px;
}

.attendee-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, background 0.3s;
    cursor: pointer;
    min-height: 80px;
    /* Larger touch target */
}

.attendee-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.attendee-card:active {
    transform: scale(0.98);
}

.attendee-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.attendee-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.attendee-email {
    font-size: 0.9rem;
    opacity: 0.6;
}

.status-badge {
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.attendee-card.validated {
    border-color: var(--success-color);
    background: rgba(0, 184, 148, 0.1);
}

.attendee-card.validated .status-badge {
    background: var(--success-color);
    color: white;
    border: none;
}

@media (max-width: 600px) {
    .glass-card {
        width: 95%;
        padding: 20px;
        max-height: 95vh;
        display: flex;
        flex-direction: column;
    }

    .attendees-list {
        flex-grow: 1;
    }

    h1 {
        font-size: 1.5rem;
    }
}

/* Admin Panel Styles */
.admin-container {
    max-width: 900px;
    width: 95%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.event-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.event-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #1a1a2e;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #aaa;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 5px;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #aaa;
    color: #aaa;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.back-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    margin-right: 10px;
}

.add-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* Admin Mobile Optimizations */
@media (max-width: 600px) {
    .header-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-actions>div {
        display: flex;
        width: 100%;
        justify-content: space-between;
    }

    .add-form {
        flex-direction: column;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}