* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.section {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.section:last-child {
    border-bottom: none;
}

.hidden {
    display: none;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

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

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background: #2980b9;
}

.validate-btn {
    background: #28a745;
    margin-top: 10px;
    width: auto;
}

.validate-btn:hover {
    background: #218838;
}

.validation-result {
    margin: 15px 0;
    padding: 15px;
    border-radius: 6px;
}

.validation-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}

.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    border-radius: 6px;
}

.loading {
    background: #cce5ff;
    border: 1px solid #99ccff;
    color: #004085;
    padding: 10px;
    border-radius: 6px;
}

.movie-info {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.poster {
    width: 100px;
    height: auto;
    border-radius: 6px;
    flex-shrink: 0;
}

.movie-details h3 {
    margin-bottom: 10px;
    color: #155724;
}

.movie-details p {
    margin-bottom: 8px;
    font-size: 14px;
}

.request-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.request-header h4 {
    color: #2c3e50;
    margin: 0;
}

.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #cce5ff;
    color: #004085;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 10px;
}

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

.admin-badge {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 10px;
}

#invitationsList ul {
    list-style: none;
    padding: 0;
}

#invitationsList li {
    padding: 10px;
    background: #f8f9fa;
    margin-bottom: 5px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: none;
}

.admin-tab-content {
    min-height: 300px;
}

.admin-request {
    border-left: 4px solid #3498db;
}

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

.status-select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    width: auto;
}

.status-select:focus {
    border-color: #3498db;
    outline: none;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

h3 {
    color: #34495e;
    margin-bottom: 15px;
}

/* User-grouped admin interface styles */
.admin-requests-view {
    margin-top: 20px;
}

.view-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.view-header h2 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.view-header p {
    color: #666;
    margin: 0;
}

.user-groups {
    display: grid;
    gap: 15px;
}

.user-group-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.user-group-item:hover {
    background: #e3f2fd;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.user-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.request-count {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-summary {
    color: #666;
    margin: 8px 0;
    font-size: 0.9rem;
}

.click-hint {
    color: #3498db;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
}

/* User requests view styles */
.user-requests-view {
    margin-top: 20px;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 15px;
    transition: background-color 0.3s;
}

.back-btn:hover {
    background: #5a6268;
}

.user-requests {
    margin-top: 20px;
}

/* Enhanced request item styles for user view */
.user-requests .request-item {
    border-left: 4px solid #28a745;
    background: #f8f9fa;
    margin-bottom: 20px;
}

/* Status indicator improvements */
.status-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Responsive improvements for user groups */
@media (max-width: 768px) {
    .user-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .request-count {
        align-self: flex-start;
    }
    
    .user-group-item {
        padding: 15px;
    }
}

@media (max-width: 600px) {
    .container {
        margin: 10px;
        border-radius: 8px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 20px;
    }
    
    .movie-info {
        flex-direction: column;
        text-align: center;
    }
    
    .poster {
        align-self: center;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .request-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .view-header h2 {
        font-size: 1.5rem;
    }
    
    .user-group-item {
        padding: 15px;
    }
    
    .user-header h3 {
        font-size: 1.1rem;
    }
}
