/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Search Section */
.search-section {
    background: white;
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 30px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 18px;
}

.search-input {
    width: 100%;
    padding: 18px 18px 18px 52px;
    border: 2px solid #e1e5e9;
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    font-weight: 400;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.search-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.stats {
    display: flex;
    gap: 16px;
}

.stat {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.filter-button:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.filter-button.active {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.filter-button.active:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 80px 20px;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Attendees List */
.attendees-list {
    display: grid;
    gap: 12px;
}

.attendee-card {
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.attendee-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.attendee-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.attendee-card:hover::before {
    opacity: 1;
}

.attendee-card.checked-in {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border-color: #4caf50;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.attendee-card.checked-in::before {
    background: linear-gradient(90deg, #4caf50, #45a049);
    opacity: 1;
}

.attendee-card.checked-in .attendee-info h3,
.attendee-card.checked-in .attendee-info p {
    color: rgb(0, 0, 0);
}

.attendee-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.attendee-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.3;
}

.attendee-info p {
    color: #666;
    font-size: 13px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

.attendee-info p i {
    width: 14px;
    color: #667eea;
    font-size: 11px;
}

.attendee-card.checked-in .attendee-info p i {
    color: rgba(0, 0, 0, 0.8);
}

.attendee-info p strong {
    font-weight: 600;
    color: #333;
}

.attendee-card.checked-in .attendee-info p strong {
    color: rgba(0, 0, 0, 0.9);
}

.attendee-card.helpdesk {
    background: linear-gradient(135deg, #fee 0%, #fcc 100%);
    border-color: #f99;
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.2);
}

.attendee-card.helpdesk::before {
    background: linear-gradient(90deg, #f99, #f66);
    opacity: 1;
}

.attendee-card.helpdesk:hover {
    border-color: #f66;
    box-shadow: 0 12px 30px rgba(255, 0, 0, 0.25);
}

.checkin-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.2);
    box-shadow: 0 1px 4px rgba(76, 175, 80, 0.1);
}

.attendee-card.checked-in .checkin-status {
    background: rgba(255,255,255,0.2);
    color: white;
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 1px 4px rgba(255,255,255,0.1);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: white;
}

.no-results i {
    font-size: 64px;
    opacity: 0.4;
    margin-bottom: 24px;
}

.no-results h3 {
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1.5rem;
}

.no-results p {
    opacity: 0.8;
    font-size: 1.1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.2);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 28px 0;
    border-bottom: 1px solid #e1e5e9;
    margin-bottom: 28px;
}

.modal-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a1a;
}

.close-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #666;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 0 28px 28px;
}

.attendee-info {
    margin-bottom: 28px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
}

.attendee-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.attendee-info p {
    margin-bottom: 10px;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

.checkin-section h4 {
    margin-bottom: 20px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 1.2rem;
}

.number-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.number-btn {
    padding: 18px;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 14px;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.number-btn:hover {
    border-color: #667eea;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.number-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.number-btn.disabled,
.number-btn:disabled {
    background: #e9ecef;
    border-color: #ced4da;
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.number-btn.disabled:hover,
.number-btn:disabled:hover {
    background: #e9ecef;
    border-color: #ced4da;
    transform: none;
    box-shadow: none;
}

.checkin-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.checkin-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.checkin-button:disabled {
    background: #e9ecef;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    color: #adb5bd;
}

.checkin-button.disabled {
    background: #e9ecef;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    color: #adb5bd;
    opacity: 0.6;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 18px 24px;
    border-radius: 14px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 380px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.toast.show {
    transform: translateX(0);
}

.success-toast {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.error-toast {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .search-section {
        padding: 24px;
        border-radius: 16px;
    }
    
    .search-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .stats {
        justify-content: space-between;
    }
    
    .attendee-card {
        padding: 14px 18px;
        border-radius: 14px;
    }
    
    .attendee-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .attendee-info h3 {
        font-size: 1.1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 24px 24px 0;
    }
    
    .modal-body {
        padding: 0 24px 24px;
    }
    
    .number-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .toast {
        right: 16px;
        left: 16px;
        max-width: none;
        top: 16px;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.8rem;
    }
    
    .search-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 16px 16px 16px 48px;
    }
    
    .number-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .number-btn {
        padding: 14px;
        font-size: 18px;
    }
    
    .attendee-card {
        padding: 12px 16px;
    }
    
    .attendee-info h3 {
        font-size: 1rem;
    }
} 