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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 40px;
}

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

/* Login Form Styles */
.login-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

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

.error {
    color: #e74c3c;
    text-align: center;
    margin-top: 15px;
    font-weight: 500;
}

/* Dashboard Styles */
.dashboard {
    background: white;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h2 {
    margin: 0;
    font-weight: 600;
}

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

.generate-token-btn {
    background: rgba(255, 193, 7, 0.9);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #212529;
    padding: 8px 16px;
    border-radius: 4px;
    width: auto;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.generate-token-btn:hover {
    background: rgba(255, 193, 7, 1);
    transform: none;
}

.api-docs-btn {
    background: rgba(23, 162, 184, 0.9);
    border: 1px solid rgba(23, 162, 184, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    width: auto;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.api-docs-btn:hover {
    background: rgba(23, 162, 184, 1);
    text-decoration: none;
    color: white;
    transform: none;
}

.api-docs-btn svg {
    flex-shrink: 0;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    width: auto;
    font-size: 14px;
}

.content {
    padding: 30px;
}

.section h3 {
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.controls {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-secondary {
    background: #6c757d;
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary svg {
    flex-shrink: 0;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

table tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

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

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Action Buttons */
.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    width: auto;
}

.delete-btn:hover {
    background: #c82333;
    transform: none;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

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

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal form {
    padding: 30px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-footer button {
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }

    .content {
        padding: 20px;
    }

    .controls {
        flex-direction: column;
    }

    table th,
    table td {
        padding: 8px 10px;
        font-size: 14px;
    }
}

/* Participants Modal Styles */
.participants-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem 0;
}

.participant-item {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    background-color: #f9f9f9;
}

.participant-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.participant-details {
    color: #666;
    font-size: 0.9rem;
}

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

.participants-loading {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.view-participants-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-right: 6px;
    width: auto;
}

.view-participants-btn:hover {
    background: #218838;
}

/* Token Modal Styles */
.token-warning {
    background: #fff3cd;
    color: #856404;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    border-left: 4px solid #ffc107;
}

.token-display {
    margin-bottom: 16px;
}

.token-display label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.token-display textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    resize: vertical;
    margin-bottom: 10px;
    word-break: break-all;
}

.token-display textarea:focus {
    outline: none;
    border-color: #667eea;
}

#copyTokenBtn {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}
