* {
    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%);
    color: #333;
    min-height: 100vh;
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
}

.login-box h2 {
    margin-bottom: 1rem;
    color: #667eea;
}

.login-box p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-box input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.login-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-box button {
    padding: 0.75rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

.login-box button:hover {
    background: #5568d3;
}

.login-error {
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

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

header h1 {
    color: #667eea;
    font-size: 2rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right span {
    background: #f3f4f6;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-small:hover {
    background: #5568d3;
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.panel h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.panel h3 {
    color: #667eea;
    margin: 1.5rem 0 1rem;
    font-size: 1.1rem;
}

/* Round Type Selector */
.round-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.type-btn {
    padding: 0.75rem;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.type-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.type-btn:hover {
    border-color: #667eea;
}

/* Form */
#roundForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#roundForm input,
#roundForm select,
#roundForm textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

#roundForm input:focus,
#roundForm select:focus,
#roundForm textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#roundForm textarea {
    min-height: 100px;
    resize: vertical;
}

.form-section {
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    border-radius: 6px;
    background: #fafafa;
}

/* Question Items */
.question-item {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.question-item input,
.question-item select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-remove-q {
    background: #ef4444;
    color: white;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    align-self: flex-end;
    width: 100px;
}

.btn-remove-q:hover {
    background: #dc2626;
}

.btn-secondary {
    background: #8b5cf6;
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-secondary:hover {
    background: #7c3aed;
}

.btn-primary {
    background: #10b981;
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
}

.btn-primary:hover {
    background: #059669;
}

#createStatus {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
}

#createStatus.success {
    background: #d1fae5;
    color: #047857;
}

#createStatus.error {
    background: #fee2e2;
    color: #dc2626;
}

/* Rounds List */
.rounds-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rounds-controls input,
.rounds-controls select {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.rounds-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.round-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem;
    transition: all 0.2s;
}

.round-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.round-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.round-card-title {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.round-card-type {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.round-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.round-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.round-card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit,
.btn-delete,
.btn-copy {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

.btn-copy {
    background: #8b5cf6;
    color: white;
}

.btn-copy:hover {
    background: #7c3aed;
}

.round-card-preview {
    background: white;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #666;
    max-height: 100px;
    overflow-y: auto;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 8000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

/* Picture Upload */
.file-upload-section {
    border: 2px dashed #ddd;
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload-section:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.file-upload-section input[type="file"] {
    display: none;
}

#picturePreview img,
#musicPreview audio {
    margin-top: 1rem;
}

/* Status Messages */
.status-message {
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    text-align: center;
    font-weight: 500;
}

.status-success {
    background: #d1fae5;
    color: #047857;
}

.status-error {
    background: #fee2e2;
    color: #dc2626;
}

.status-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Responsive */
@media (max-width: 768px) {
    .round-type-selector {
        grid-template-columns: 1fr;
    }

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

    .rounds-controls {
        flex-direction: column;
    }

    .round-card-actions {
        flex-direction: column;
    }

    .btn-edit,
    .btn-delete,
    .btn-copy {
        width: 100%;
    }
}
