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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #001a4d 0%, #000000 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Mobile Detection Class */
body.mobile {
    /* Mobile-specific styles applied via this class */
}

body.desktop {
    /* Desktop-specific styles applied via this class */
}

header {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.app-name {
    font-family: 'Squada One', cursive;
    font-size: 1.8rem;
    font-weight: 400;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.app-name:hover {
    opacity: 0.8;
}

.header-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    position: relative;
}

.login-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.login-link:hover {
    opacity: 0.8;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.user-name {
    color: #fff;
    font-weight: 600;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    margin-top: 0.5rem;
    display: none;
    z-index: 1000;
}

.dropdown-menu.active {
    display: block;
}

.settings-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
    text-align: left;
}

.settings-btn:hover {
    background: #f0f0f0;
}

.logout-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    color: #dc3545;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
    text-align: left;
}

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

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 2rem;
}

#pageContent {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100%;
    gap: 2rem;
}

.container {
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
}

h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Settings Page */

.settings-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.settings-section h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: 'Squada One', cursive;
}

.profile-picture-upload {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    cursor: pointer;
}

.settings-profile-picture {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
    display: block;
}

.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    padding: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.profile-picture-upload:hover .upload-overlay {
    opacity: 1;
}

.form-group {
    margin-bottom: 1.5rem;
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

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

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    background-color: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

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

.form-group .availability-check {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.form-group .availability-check.available {
    color: #28a745;
    display: block;
}

.form-group .availability-check.taken {
    color: #dc3545;
    display: block;
}

.form-group .availability-check.checking {
    color: #667eea;
    display: block;
}

.btn-primary {
    background: #667eea;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

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

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

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

.danger-zone {
    border: 2px solid #dc3545;
    background: #fff5f5;
}

.danger-zone h2 {
    color: #dc3545;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: #001a4d;
    padding: 2rem;
    border-radius: 10px;
    border: 2px solid #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    text-align: center;
}

#addQuestionModal .modal-content {
    max-width: 1000px;
    text-align: left;
}

@media (max-width: 768px) {
    #addQuestionModal .modal-content {
        max-width: 90vw;
    }
}

.modal-content h2 {
    color: #fff;
    margin-bottom: 1rem;
}

.modal-content p {
    color: #e0e0e0;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-content .btn-primary {
    background: #667eea;
    color: white;
}

.modal-content .btn-primary:hover {
    background: #5568d3;
}

.modal-content .btn-secondary {
    background: #6c757d;
    color: white;
}

.modal-content .btn-secondary:hover {
    background: #5a6268;
}

.modal-content .btn-danger {
    background: #dc3545;
    color: white;
}

.modal-content .btn-danger:hover {
    background: #c82333;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block;
}

.back-link:hover {
    text-decoration: underline;
}

/* Profile Page */
.profile-container {
    max-width: 500px;
    margin: 0 auto;
}

.profile-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 2rem;
}

.profile-picture {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
    margin-bottom: 1.5rem;
}

.profile-picture-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #667eea;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    font-weight: 600;
}

.profile-nickname {
    color: #333;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-family: 'Squada One', cursive;
}

.profile-name {
    color: #666;
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0;
}


/* Upload Spinner */
.upload-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.spinner-overlay {
    text-align: center;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-small {
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.input-with-spinner {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-spinner input,
.input-with-spinner select {
    flex: 1;
}

.rounds-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rounds-input-group input {
    min-width: 50px;
    width: 50px;
    text-align: center;
    flex: 0 0 auto;
}

/* Hide built-in number input spinner buttons */
.rounds-input-group input::-webkit-outer-spin-button,
.rounds-input-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.rounds-input-group input[type=number] {
    -moz-appearance: textfield;
}

.rounds-btn {
    background-color: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: background-color 0.2s ease;
    flex: 0 0 auto;
}

.rounds-btn:hover {
    background-color: #2a2a2a;
}

.rounds-btn:active {
    background-color: #0a0a0a;
}

.spinner-inline {
    display: inline-block;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-top: 2px solid #667eea;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.spinner-overlay p {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Home Page */
.home-page {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.quizmaster-link {
    font-family: 'Squada One', cursive;
    font-size: 1.8rem;
    font-weight: 400;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: inline-block;
}

.quizmaster-link:hover {
    opacity: 0.8;
}

/* Quizmaster Page */
.quizmaster-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.quizmaster-menu-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 6px;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.quizmaster-menu-item:hover {
    border-color: #667eea;
    background-color: #222;
}

.menu-title {
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 600;
}

.menu-description {
    color: #999;
    font-size: 0.9rem;
}

/* Standardized Content Sections */
.content-section {
    background: #000;
    color: #fff;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 2rem;
    min-width: 75%;
    max-width: 900px;
    margin: 0 auto;
}

/* Mobile version of content-section */
body.mobile .content-section {
    min-width: 90%;
}

.content-section h2 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: 'Squada One', cursive;
}

.content-section h1 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-family: 'Squada One', cursive;
}

body.mobile .content-section h2 {
    font-size: 1.25rem;
}

body.mobile .content-section h1 {
    margin-bottom: 1rem;
}

.content-section p {
    color: #fff;
    font-size: 1rem;
}

body.mobile .content-section p {
    font-size: 0.9rem;
}

.content-section label {
    color: #fff;
}

.content-section input,
.content-section select {
    background-color: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
}

.content-section select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

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

.content-section button {
    background-color: #667eea;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.content-section button:hover {
    background-color: #5568d3;
}

.content-section button:disabled {
    background-color: #999;
    cursor: not-allowed;
}

/* Quizzes Page */

.quizzes-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.quiz-card {
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.quiz-card:hover {
    border-color: #667eea;
    background-color: #222;
}

.quiz-card-title {
    color: #667eea;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: color 0.2s ease;
    word-break: break-word;
}

.quiz-card-title:hover {
    color: #5568d3;
    text-decoration: underline;
}

.quiz-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}

.quiz-rounds {
    color: #ccc;
}

.quiz-date {
    color: #999;
    font-size: 0.85rem;
}

.quizzes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.quizzes-table thead {
    background-color: #2a2a2a;
}

.quizzes-table th {
    color: #fff;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #444;
}

.quizzes-table td {
    color: #e0e0e0;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #333;
}

.quizzes-table tbody tr:hover {
    background-color: #1a1a1a;
}

.quiz-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.quiz-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-active {
    background-color: #28a745;
    color: #fff;
}

.status-inactive {
    background-color: #6c757d;
    color: #fff;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 1.19rem;
    font-weight: 400;
    color: #ccc;
    margin-bottom: 2rem;
    text-align: left;
}

.breadcrumbs a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: #5568d3;
    text-decoration: underline;
}

.breadcrumbs span {
    color: #ccc;
    margin: 0 0.5rem;
}


/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
    }

    .app-name {
        font-size: 1.4rem;
    }

    .header-links {
        gap: 1rem;
    }

    main {
        padding: 1rem;
    }

    .breadcrumbs {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    #pageContent {
        width: 100%;
    }

    .quizzes-container {
        padding: 1rem;
    }

    .profile-container {
        max-width: 100%;
    }

    .container {
        padding: 1.5rem;
        max-width: 90%;
    }

    .my-quizzes-link {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.75rem 1rem;
    }

    .app-name {
        font-size: 1.2rem;
        letter-spacing: 0.5px;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
    }

    .user-name {
        display: none;
    }

    main {
        padding: 0.75rem;
    }

    .breadcrumbs {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .content-section h2 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .btn-primary,
    .btn-danger,
    .btn-secondary {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .profile-picture,
    .profile-picture-placeholder,
    .settings-profile-picture {
        width: 100px;
        height: 100px;
    }

    .my-quizzes-link {
        font-size: 1.2rem;
    }
}

/* Skeleton Loading Animation */
.skeleton-card {
    pointer-events: none;
}

.skeleton-bar {
    background: linear-gradient(90deg, #2a2a2a 0%, #3a3a3a 50%, #2a2a2a 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-title {
    height: 1.2rem;
    width: 100%;
    margin-bottom: 1rem;
}

.skeleton-stat {
    height: 0.9rem;
    width: 100%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Questions Page */

.questions-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.question-card {
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.question-card:hover {
    border-color: #667eea;
    background-color: #222;
}

.question-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.question-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #667eea;
}

.question-card-title {
    color: #667eea;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.2s ease;
    word-break: break-word;
    flex: 1;
}

.question-card-title:hover {
    color: #5568d3;
    text-decoration: underline;
}

.question-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}

.question-type {
    color: #ccc;
    background-color: #2a2a2a;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.question-visibility {
    color: #999;
    font-size: 0.85rem;
}

.question-date {
    color: #999;
    font-size: 0.85rem;
}

/* Question Edit Page */

.btn-back {
    background: none;
    color: #667eea;
    border: none;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
    margin-bottom: 1rem;
    display: block;
}

.btn-back:hover {
    color: #8fa3f5;
    text-decoration: underline;
}

.question-meta-fields {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.question-meta-group {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.question-meta-group input,
.question-meta-group select {
    width: 120px;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.question-type-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #ccc;
    font-size: 0.95rem;
}

.radio-label input[type="radio"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.radio-label input[type="radio"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.radio-label:has(input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}

#questionTypeContent textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.95rem;
    resize: vertical;
}

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

/* Tags Input Styling */
.tags-input-container {
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    min-height: 44px;
    align-items: flex-start;
    align-content: flex-start;
}

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

.tags-input-container.modified {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.05);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #667eea;
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.tag-remove {
    cursor: pointer;
    font-weight: bold;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.tag-remove:hover {
    opacity: 1;
}

.tags-input {
    flex: 1;
    min-width: 100px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    padding: 0;
    flex-shrink: 0;
}

.tags-input::placeholder {
    color: #666;
}

/* Question Tags on Cards */
.question-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.question-tag-chip {
    display: inline-block;
    background-color: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.question-tag-chip:hover {
    background-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

/* Search Box Styling */
.questions-search-container {
    margin-bottom: 1.5rem;
}

.questions-search-input {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    background-color: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 0.95rem;
}

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

.questions-filter-status {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #999;
}

/* Search Box Clear Button */
.questions-search-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 400px;
}

.questions-search-input {
    width: 100%;
    padding-right: 2.5rem;
}

.questions-search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    display: none;
    transition: color 0.2s;
}

.questions-search-clear:hover {
    color: #ccc;
}

.questions-search-clear.visible {
    display: block;
}

/* Delete Button */
.btn-delete {
    background-color: #dc3545 !important;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: block;
    font-weight: 600;
    width: auto;
    margin: 0;
}

.btn-delete:hover {
    background-color: #c82333 !important;
}

.btn-delete:disabled {
    background-color: #999 !important;
    cursor: not-allowed;
}

/* Multiple Choice Options */
.mc-options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.mc-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mc-option input[type="text"] {
    flex: 1;
    padding: 0.75rem;
    background-color: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 0.95rem;
}

.mc-option input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mc-option input[type="text"].modified {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.05);
}

.mc-option-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid #667eea;
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.mc-option-checkbox:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.mc-option-checkbox.checked {
    background-color: #667eea;
}

.mc-option-checkbox.checked::after {
    content: '✓';
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
}

.mc-option-delete {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.4rem;
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
    flex-shrink: 0;
    font-weight: bold;
    line-height: 1;
}

.mc-option-delete:hover {
    color: #a02830;
    transform: scale(1.2);
}

.mc-add-option-btn {
    background-color: #667eea;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s;
    align-self: flex-start;
    margin-top: 0.5rem;
}

.mc-add-option-btn:hover {
    background-color: #5568d3;
}

.mc-add-option-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
}

/* Quiz Edit - Questions Section */
.questions-section h2 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-family: 'Squada One', cursive;
}

.round-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.round-nav-btn {
    background-color: #667eea;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.round-nav-btn:hover:not(:disabled) {
    background-color: #5568d3;
}

.round-nav-btn:disabled {
    background-color: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

.round-display {
    min-width: 150px;
    text-align: center;
}

.round-number {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Squada One', cursive;
}

.round-questions-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.question-card-in-quiz {
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    width: 100%;
}

.question-card-in-quiz:hover {
    border-color: #667eea;
    background-color: #222;
}

.question-card-in-quiz.dragging {
    opacity: 0.5;
    background-color: #0a0a0a;
}

.question-card-in-quiz-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.question-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    min-width: 50px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

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

.question-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.questions-with-numbers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.question-row-with-number {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.questions-numbers-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-shrink: 0;
}

.question-number-item {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
}

.question-card-in-quiz-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.question-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.question-card-controls {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
    flex-shrink: 0;
}

.question-move-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.question-move-btn:hover:not(:disabled) {
    background: #667eea;
    color: #fff;
}

.question-move-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.question-remove-btn {
    border-color: #e74c3c;
    color: #e74c3c;
}

.question-remove-btn:hover {
    background: #e74c3c;
    color: #fff;
}

.round-questions-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.question-card-header-in-quiz {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.question-title-in-quiz {
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    word-break: break-word;
}

.question-card-meta-in-quiz {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.question-type-badge {
    background-color: #2a2a2a;
    color: #ccc;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.question-type-badge.type-text {
    background-color: #add8e6;
    color: #001a4d;
}

.question-type-badge.type-multiple_choice {
    background-color: #90ee90;
    color: #001a4d;
}

.question-type-badge.type-anagram {
    background-color: #ffb3b3;
    color: #001a4d;
}

.question-type-badge.type-music {
    background-color: #ffffe0;
    color: #001a4d;
}

.question-type-badge.type-image {
    background-color: #ffb3e6;
    color: #001a4d;
}

.question-type-badge.type-video {
    background-color: #d8b3ff;
    color: #001a4d;
}

.question-visibility-badge {
    background-color: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Modal Close Button */
.modal-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: #ccc;
}

/* Question Card with Checkbox */
.question-card-with-checkbox {
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.question-card-with-checkbox:hover {
    border-color: #667eea;
    background-color: #222;
}

.question-checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.question-modal-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.question-card-content {
    flex: 1;
    min-width: 0;
}

.question-title-in-modal {
    color: #667eea;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    word-break: break-word;
}

.question-card-meta-in-modal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}


/* ============================================================================
   Drag-and-Drop Styles for Questions Container
   ============================================================================ */

.questions-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
    transition: background-color 0.2s ease, border 0.2s ease;
}

.questions-container.drag-active {
    background-color: rgba(102, 126, 234, 0.05);
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 1rem;
}

/* Question Card in Round */
.question-card-in-round {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: #1a1a1a;
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
}

.question-card-in-round:hover {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.05);
}

.question-card-in-round.dragging {
    opacity: 0.5;
    cursor: grabbing;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: scale(0.98);
}

.question-card-in-round.drag-over {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
    border-width: 2px;
}

/* Drag Handle */
.question-drag-handle {
    flex-shrink: 0;
    font-size: 1.2rem;
    color: #999;
    cursor: grab;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    transition: color 0.2s ease;
}

.question-card-in-round:hover .question-drag-handle {
    color: #667eea;
}

.question-card-in-round.dragging .question-drag-handle {
    cursor: grabbing;
    color: #667eea;
}

/* Content Wrapper */
.question-card-content-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Round Navigation */
.round-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.round-nav-btn {
    background-color: #333;
    border: 1px solid #444;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.round-nav-btn:hover:not(:disabled) {
    background-color: #667eea;
    border-color: #667eea;
}

.round-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.round-display {
    min-width: 120px;
    text-align: center;
}

.round-number {
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Questions Section */
.questions-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #444;
}

.questions-section h2 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.round-questions-container {
    min-height: 100px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .question-card-in-round {
        flex-direction: column;
        gap: 0.75rem;
    }

    .question-drag-handle {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .round-navigation {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .round-nav-btn {
        flex: 1;
        min-width: 60px;
    }

    .questions-container.drag-active {
        padding: 0.75rem;
    }
}
