/* Admin Panel Styles */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #121212;
    color: #e0e0e0;
    line-height: 1.6;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.admin-header {
    background: #1f1f1f;
    color: #e0e0e0;
    padding: 1rem 0;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 2px solid #333;
}

.admin-header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.admin-header nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.admin-header nav a {
    background: #2d2d30;
    color: #e0e0e0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 1px solid #404040;
    transition: all 0.3s;
}

.admin-header nav a:hover {
    background: #404040;
    border-color: #555;
}

/* Main Content */
.admin-main {
    background: #1e1e1e;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.section h2 {
    color: #e0e0e0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4a90e2;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #e0e0e0;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #404040;
    border-radius: 4px;
    font-size: 1rem;
    background: #2d2d30;
    color: #e0e0e0;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.5);
}

.form-group input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 2px dashed #404040;
    border-radius: 4px;
    background: #2d2d30;
    color: #e0e0e0;
}

.form-group small {
    color: #aaa;
    font-size: 0.875rem;
}

/* Answers Section */
.answers-section {
    background: #262626;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #404040;
}

.answers-section h3 {
    color: #4a90e2;
    margin-bottom: 15px;
}

.answer-group {
    margin-bottom: 15px;
    padding: 12px;
    background: #2d2d30;
    border-radius: 8px;
    border: 2px solid #404040;
}

.answer-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #e0e0e0;
}

.answer-group input[type="radio"] {
    accent-color: #4a90e2;
    transform: scale(1.2);
}

.answer-input {
    flex: 1;
    margin-left: 10px !important;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, #2a5298, #1e3c72);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: linear-gradient(45deg, #6c757d, #495057);
    color: white;
}

.btn-danger {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
}

/* Questions Management */
.filter-section {
    background: #262626;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #404040;
}

.filter-section label {
    font-weight: bold;
    color: #4a90e2;
    white-space: nowrap;
}

.filter-section select {
    flex: 1;
    max-width: 300px;
}

.questions-list {
    display: grid;
    gap: 20px;
}

.question-card {
    background: #262626;
    border: 2px solid #404040;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.question-level {
    background: linear-gradient(45deg, #2a5298, #1e3c72);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.question-text {
    font-size: 16px;
    margin-bottom: 15px;
    line-height: 1.5;
    color: #e0e0e0;
}

.question-image {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    margin: 10px 0;
    display: block;
}

.question-answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}

.answer-item {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.answer-correct {
    background: #1a4a2a;
    border: 2px solid #28a745;
    color: #4ade80;
    font-weight: bold;
}

.answer-incorrect {
    background: #2d2d30;
    border: 2px solid #404040;
    color: #aaa;
}

.question-actions {
    text-align: right;
    margin-top: 15px;
}

/* Message Container */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.message {
    background: #2d2d30;
    color: #e0e0e0;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
    min-width: 300px;
    border: 1px solid #404040;
}

.message.success {
    border-left: 5px solid #28a745;
    background: #1a4a2a;
    color: #4ade80;
    border-color: #28a745;
}

.message.error {
    border-left: 5px solid #dc3545;
    background: #4a1a1a;
    color: #f87171;
    border-color: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Simplified Admin Layout */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.admin-actions {
    display: grid;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.action-card {
    background: #262626;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #404040;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.action-card h3 {
    color: #4a90e2;
    margin-bottom: 10px;
    font-size: 20px;
}

.action-card p {
    color: #aaa;
    margin-bottom: 20px;
}

.quick-form {
    display: flex;
    gap: 10px;
    align-items: end;
}

.quick-form input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #404040;
    border-radius: 6px;
    background: #2d2d30;
    color: #e0e0e0;
}

.quick-form .btn {
    padding: 10px 20px;
    white-space: nowrap;
}

.simple-game-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #2d2d30;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #404040;
}

.simple-game-info h4 {
    color: #e0e0e0;
    margin: 0 0 5px 0;
    font-size: 16px;
}

.simple-game-info p {
    color: #aaa;
    margin: 0;
    font-size: 14px;
}

.simple-game-actions {
    display: flex;
    gap: 8px;
}

.simple-game-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.game-status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.game-status-indicator.complete {
    background: #28a745;
}

.game-status-indicator.incomplete {
    background: #dc3545;
}

/* Game Management Page Styles */
.game-info-card {
    background: #262626;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #404040;
    margin-bottom: 25px;
    text-align: center;
}

.game-info-card h2 {
    color: #e0e0e0;
    margin-bottom: 10px;
}

.game-info-card p {
    color: #aaa;
    margin-bottom: 15px;
}

.progress-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

.questions-count {
    color: #4a90e2;
    font-weight: bold;
}

.completion-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.completion-status.complete {
    background: #1a4a2a;
    color: #4ade80;
    border: 1px solid #28a745;
}

.completion-status.incomplete {
    background: #4a1a1a;
    color: #f87171;
    border: 1px solid #dc3545;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.answer-item {
    background: #2d2d30;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #404040;
}

.answer-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
    cursor: pointer;
}

.answer-label {
    font-weight: bold;
    color: #4a90e2;
    min-width: 20px;
}

.answer-input {
    flex: 1;
    padding: 6px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #1e1e1e;
    color: #e0e0e0;
    font-size: 14px;
}

.level-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
}

.level-tab {
    padding: 6px 12px;
    background: #2d2d30;
    border: 1px solid #404040;
    border-radius: 6px;
    color: #aaa;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.level-tab:hover {
    background: #404040;
    color: #e0e0e0;
}

.level-tab.active {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.level-tab.has-questions {
    background: #1a4a2a;
    border-color: #28a745;
    color: #4ade80;
}

.questions-container {
    min-height: 200px;
}

.question-item {
    background: #2d2d30;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #404040;
    margin-bottom: 15px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.question-text {
    color: #e0e0e0;
    margin-bottom: 10px;
}

.question-answers-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 12px;
}

.answer-preview {
    padding: 4px 8px;
    border-radius: 4px;
    background: #1e1e1e;
    color: #aaa;
}

.answer-preview.correct {
    background: #1a4a2a;
    color: #4ade80;
    font-weight: bold;
}

.question-actions {
    display: flex;
    gap: 8px;
}

.question-actions .btn {
    padding: 4px 8px;
    font-size: 11px;
}

/* Games Management */
.game-form-section {
    background: #262626;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #404040;
}

.game-form-section h3 {
    color: #4a90e2;
    margin-bottom: 15px;
}

.games-list-section h3 {
    color: #e0e0e0;
    margin-bottom: 15px;
}

.games-list {
    display: grid;
    gap: 20px;
}

.game-card {
    background: #262626;
    border: 2px solid #404040;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.game-card.incomplete {
    border-color: #dc3545;
}

.game-card.complete {
    border-color: #28a745;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.game-title {
    color: #e0e0e0;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.game-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.game-status.complete {
    background: #1a4a2a;
    color: #4ade80;
    border: 1px solid #28a745;
}

.game-status.incomplete {
    background: #4a1a1a;
    color: #f87171;
    border: 1px solid #dc3545;
}

.game-description {
    color: #aaa;
    margin-bottom: 15px;
    line-height: 1.4;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #2d2d30;
    border-radius: 6px;
}

.game-questions-count {
    color: #4a90e2;
    font-weight: bold;
}

.game-progress {
    font-size: 12px;
    color: #aaa;
}

.game-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.game-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* Copyright Notice */
.copyright {
    position: fixed;
    bottom: 10px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #ccc;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    z-index: 1000;
    pointer-events: none;
    user-select: none;
    opacity: 0.8;
}

/* Basic Responsive */
@media (max-width: 768px) {
    .copyright {
        font-size: 0.6rem;
        padding: 3px 6px;
        bottom: 8px;
        right: 10px;
    }
    
    .admin-header nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .question-answers {
        grid-template-columns: 1fr;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-section select {
        max-width: 100%;
    }
}
