/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000;
    color: #fff;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Typography */
h1 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Buttons */
button, .btn {
    background-color: #444;
    color: #fff;
    border: 1px solid #666;
    padding: 10px 30px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

button:hover, .btn:hover {
    background-color: #555;
}

button:active, .btn:active {
    background-color: #333;
}

.btn-primary {
    background-color: #0066cc;
    border-color: #0066cc;
}

.btn-primary:hover {
    background-color: #0052a3;
}

.btn-danger {
    background-color: #cc0000;
    border-color: #cc0000;
}

.btn-danger:hover {
    background-color: #a30000;
}

/* Forms */
input[type="text"],
input[type="password"],
textarea,
select {
    background-color: #222;
    color: #fff;
    border: 1px solid #444;
    padding: 10px;
    font-size: 14px;
    border-radius: 4px;
    width: 100%;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #666;
}

textarea {
    resize: vertical;
    min-height: 100px;
    font-family: Arial, sans-serif;
}

/* Form groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

/* Radio buttons and checkboxes */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
}

.radio-option:hover,
.checkbox-option:hover {
    background-color: #222;
}

/* Question container */
.question-container {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.question-text {
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Rating scale */
.rating-scale {
    display: flex;
    gap: 15px;
    align-items: center;
    margin: 15px 0;
    flex-wrap: wrap;
}

.rating-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.rating-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-bottom: 5px;
}

.rating-option label {
    font-size: 12px;
    cursor: pointer;
    text-align: center;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border: 2px solid #444;
    border-radius: 4px;
}

.image-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 10px;
    flex-wrap: wrap;
}

.image-preview {
    cursor: pointer;
    transition: transform 0.2s;
    max-width: 400px;
}

.image-preview:hover {
    transform: scale(1.02);
    border-color: #666;
}

/* Image popup */
.image-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.image-popup.active {
    display: flex;
}

.image-popup img {
    max-width: 90%;
    max-height: 90%;
    border: 3px solid #fff;
}

.image-popup-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
}

/* Navigation */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.nav-buttons button {
    min-width: 150px;
}

/* Progress indicator */
.progress-text {
    text-align: center;
    color: #888;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Welcome page */
.welcome-container {
    text-align: center;
    padding: 60px 20px;
}

.welcome-container h1 {
    font-size: 48px;
    margin-bottom: 30px;
}

.welcome-container p {
    font-size: 18px;
    margin-bottom: 40px;
    color: #ccc;
}

/* Name input page */
.name-input-container {
    text-align: center;
    padding: 80px 20px;
}

.name-input-container input {
    max-width: 400px;
    margin: 20px auto;
    text-align: center;
    font-size: 16px;
}

/* Admin panel */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #333;
}

.admin-section {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.admin-section h2 {
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.response-selector {
    margin-bottom: 20px;
}

.response-selector select {
    max-width: 500px;
}

.result-container {
    background-color: #0a0a0a;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.result-header {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.result-section {
    margin-bottom: 20px;
}

.result-section h3 {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 10px;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.result-table td {
    padding: 8px;
    border: 1px solid #333;
}

.result-table td:first-child {
    font-weight: bold;
    width: 40%;
}

/* Test user generation */
.test-user-form {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.test-user-form select {
    max-width: 200px;
}

/* Error messages */
.error {
    background-color: #cc0000;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

/* Success messages */
.success {
    background-color: #00cc00;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
    }

    .rating-scale {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .nav-buttons button {
        width: 100%;
    }
}

/* Loading spinner */
.spinner {
    border: 4px solid #333;
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
