/* Dark Academia - Elegant Professional CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', 'Georgia', serif;
    background-color: #f8f6f0;
    color: #3c2414;
    line-height: 1.7;
    padding: 20px;
}

.quiz-container {
    max-width: 860px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 2px;
    box-shadow: 0 2px 12px rgba(60, 36, 20, 0.1);
    border: 1px solid #d4c5b0;
}

.quiz-header {
    background: linear-gradient(135deg, #8b4513 0%, #654321 100%);
    color: #f8f6f0;
    padding: 40px 35px;
    text-align: center;
    position: relative;
}

.quiz-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(248,246,240,0.1)"/></svg>') repeat;
    background-size: 20px 20px;
    opacity: 0.3;
}

.quiz-title {
    font-size: 2.3rem;
    font-weight: 400;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-variant: small-caps;
    letter-spacing: 1px;
}

.quiz-subtitle {
    font-size: 1.1rem;
    font-style: italic;
    opacity: 0.95;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.account-info {
    background-color: rgba(248, 246, 240, 0.2);
    color: #f8f6f0;
    padding: 10px 22px;
    border: 1px solid rgba(248, 246, 240, 0.3);
    display: inline-block;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    position: relative;
    z-index: 1;
}

.loader {
    text-align: center;
    padding: 60px;
    color: #8b4513;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 3px solid #f0ede7;
    border-top: 3px solid #8b4513;
    border-radius: 50%;
    animation: spin 1.5s ease-in-out infinite;
    margin: 0 auto 20px;
}

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

.main-content {
    padding: 38px;
    background-color: #fefcf8;
}

.score-section {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #3c2414;
    padding: 26px;
    border-radius: 2px;
    margin-bottom: 32px;
    text-align: center;
    border: 1px solid #c19b26;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.score-display h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 400;
    font-variant: small-caps;
}

.score-message {
    font-size: 1rem;
    font-style: italic;
    opacity: 0.9;
}

.questions-container {
    max-height: 650px;
    overflow-y: auto;
    padding-right: 8px;
}

.questions-container::-webkit-scrollbar {
    width: 8px;
}

.questions-container::-webkit-scrollbar-track {
    background: #f0ede7;
    border-radius: 4px;
}

.questions-container::-webkit-scrollbar-thumb {
    background: #d4c5b0;
    border-radius: 4px;
}

.question-card {
    border: 1px solid #d4c5b0;
    border-radius: 2px;
    margin-bottom: 28px;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(60, 36, 20, 0.05);
}

.question-card:hover {
    box-shadow: 0 4px 15px rgba(60, 36, 20, 0.12);
    border-color: #8b4513;
}

.question-header {
    background: linear-gradient(to right, #f8f6f0, #f0ede7);
    border-bottom: 1px solid #d4c5b0;
    padding: 22px 28px;
}

.question-header h3 {
    font-size: 1.15rem;
    font-weight: 500;
    color: #3c2414;
    line-height: 1.5;
    font-variant: small-caps;
}

.answer-form {
    padding: 28px;
}

.bgradio {
    margin-bottom: 26px;
}

.option-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    margin-bottom: 12px;
    background-color: #fefcf8;
    border: 1px solid #e8e0d0;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.option-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(to right, rgba(139, 69, 19, 0.1), transparent);
    transition: width 0.3s ease;
}

.option-item:hover {
    background-color: #f8f6f0;
    border-color: #8b4513;
    transform: translateX(3px);
}

.option-item:hover::before {
    width: 4px;
}

.option-item input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 16px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #8b4513;
}

.option-item label {
    flex: 1;
    cursor: pointer;
    font-size: 1rem;
    color: #3c2414;
    line-height: 1.6;
}

.submit-btn {
    background: linear-gradient(135deg, #8b4513 0%, #654321 100%);
    color: #f8f6f0;
    border: none;
    padding: 13px 28px;
    border-radius: 2px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-variant: small-caps;
    box-shadow: 0 2px 6px rgba(60, 36, 20, 0.2);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #654321 0%, #4a2c17 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(60, 36, 20, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.customtable {
    margin-top: 22px;
    border: 1px solid #d4c5b0;
    border-radius: 2px;
    overflow: hidden;
}

.customtable caption {
    font-size: 1.1rem;
    font-weight: 500;
    color: #3c2414;
    margin-bottom: 15px;
    text-align: left;
    font-style: italic;
    font-variant: small-caps;
}

.customtable table {
    width: 100%;
    border-collapse: collapse;
}

.customtable th {
    background: linear-gradient(135deg, #8b4513 0%, #654321 100%);
    color: #f8f6f0;
    padding: 16px 20px;
    text-align: left;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-variant: small-caps;
}

.customtable td {
    padding: 14px 20px;
    border-bottom: 1px solid #e8e0d0;
    color: #3c2414;
    font-size: 0.95rem;
}

.customtable tr:last-child td {
    border-bottom: none;
}

.customtable tr:nth-child(even) {
    background-color: #fefcf8;
}

.customtable tr:nth-child(odd) {
    background-color: #f8f6f0;
}

.submit-all-section {
    text-align: center;
    margin-top: 42px;
    padding-top: 35px;
    border-top: 2px solid #d4c5b0;
    position: relative;
}

.submit-all-section::before {
    content: '❦';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #fefcf8;
    padding: 0 15px;
    color: #8b4513;
    font-size: 1.5rem;
}

.submit-all-btn {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #3c2414;
    border: 2px solid #c19b26;
    padding: 16px 42px;
    border-radius: 2px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-variant: small-caps;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-all-btn:hover {
    background: linear-gradient(135deg, #b8941f 0%, #9a7a1a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.submit-all-btn:hover::before {
    left: 100%;
}

.submit-all-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .quiz-container {
        margin: 10px;
    }
    
    .quiz-header {
        padding: 30px 25px;
    }
    
    .main-content {
        padding: 28px 25px;
    }
    
    .quiz-title {
        font-size: 2rem;
    }
    
    .questions-container {
        max-height: 500px;
    }
    
    .option-item {
        padding: 14px 18px;
    }
}