/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 1rem;
}

.headline {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Login page styles */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .headline {
    justify-content: center;
    margin-bottom: 0.5rem;
}

.login-header h1 {
    color: #333;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

input[type="text"], 
input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus, 
input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.checkbox-group label {
    margin-bottom: 0;
}

input[type="checkbox"] {
    width: auto;
}

.btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.error {
    background: #fee;
    color: #c33;
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border-left: 4px solid #c33;
}

/* Dashboard page styles */
.dashboard-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.header {
    background: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    background: #dc3545;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background: #c82333;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.ticket-display {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ticket-display h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.ticket {
    border: 2px dashed #667eea;
    padding: 2rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea10 0%, #764ba220 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ticket::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    pointer-events: none;
}

.ticket-item-name {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ticket-code {
    font-size: 1.1rem;
    color: #764ba2;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ticket-attendee-name {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 500;
}

.ticket-time {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.no-ticket {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 3rem;
}

.recent-tickets {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.recent-tickets h3 {
    padding: 1.5rem 1.5rem 1rem;
    color: #333;
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
}

.recent-ticket {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.recent-ticket:last-child {
    border-bottom: none;
}

.recent-ticket:hover {
    background: #f8f9fa;
}

.recent-ticket-item-name {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.recent-ticket-code {
    color: #333;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.recent-ticket-time {
    color: #888;
    font-size: 0.7rem;
}

.no-recent-tickets {
    padding: 2rem;
    text-align: center;
    color: #666;
    font-style: italic;
}

.webhook-info {
    background: #e7f3ff;
    border: 1px solid #b3d7ff;
    border-radius: 5px;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #0066cc;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Transition effects for dynamic updates */
#latest-ticket-container,
#recent-tickets-container {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ticket-update-highlight {
    background-color: rgba(102, 126, 234, 0.1) !important;
    transition: background-color 1s ease;
}

/* Loading state styles */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced hover effects for dynamic content */
.recent-ticket {
    transition: all 0.2s ease;
}

.recent-ticket:hover {
    background: #f8f9fa;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
    }
}
