/* ===== GENERAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(to bottom right, #f0f9ff, #e0f2fe);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== NAVIGATION ===== */
nav {
    background: #1e3a8a;
    color: white;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

nav .max-w-7xl {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1rem;
}

nav h1 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

nav a {
    background-color: #1e40af;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
}

nav a:hover {
    background-color: #1e3a8a;
}

/* ===== MIND MAP STYLES ===== */
.mind-map {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.center-node {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border: 3px solid #1e3a8a;
    border-radius: 50%;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    margin: 0 auto;
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.center-node:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(30, 58, 138, 0.5);
}

.branch {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 50px;
}

.branch-item {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    border: 2px solid #0891b2;
    border-radius: 15px;
    padding: 20px;
    width: 200px;
    text-align: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(8, 145, 178, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.branch-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(8, 145, 178, 0.5);
}

.sub-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.sub-item {
    background: #e0f2fe;
    color: #0c4a6e;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border-left: 4px solid #0891b2;
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    border: none;
    background: none;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #000;
}

.modal-header {
    color: #1e3a8a;
    margin-bottom: 20px;
    border-bottom: 3px solid #3b82f6;
    padding-bottom: 15px;
}

.modal-header h2 {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.modal-header p {
    color: #666;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h3 {
    color: #0891b2;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 18px;
}

.modal-section p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 10px;
}

.modal-list {
    list-style: none;
    padding: 0;
}

.modal-list li {
    color: #333;
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.modal-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #0891b2;
    font-weight: bold;
}

.highlight {
    background-color: #fef3c7;
    padding: 15px;
    border-left: 4px solid #fbbf24;
    border-radius: 5px;
    margin: 15px 0;
    font-size: 0.95rem;
}

/* ===== SECTIONS - ČINJENICE, OSOBE, DOGAĐAJI ===== */
.person-card {
    background: white;
    border-left: 4px solid #3b82f6;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.person-card h4 {
    color: #1e3a8a;
    margin: 0 0 8px 0;
    font-size: 16px;
}

.person-card p {
    color: #555;
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== TIMELINE STYLES ===== */
.events-timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    display: flex;
    margin-bottom: 25px;
    position: relative;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: 45px;
    top: 50px;
    bottom: -25px;
    width: 3px;
    background: #3b82f6;
}

.timeline-item:last-child:before {
    display: none;
}

.timeline-marker {
    background: #1e3a8a;
    width: 90px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    margin-right: 20px;
    flex-shrink: 0;
}

.timeline-content {
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 10px;
    padding: 15px;
    flex-grow: 1;
}

.timeline-content strong {
    color: #1e3a8a;
}

.timeline-content p {
    color: #666;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ===== FACT BOX STYLES ===== */
.fact-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0891b2;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #0c4a6e;
    line-height: 1.5;
}

/* ===== CAUSALITY BOX STYLES ===== */
.causality-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cause {
    flex: 1;
    background: #fee2e2;
    padding: 12px;
    border-left: 4px solid #ef4444;
    border-radius: 6px;
}

.cause strong {
    color: #991b1b;
}

.arrow {
    font-size: 24px;
    color: #3b82f6;
    font-weight: bold;
    text-align: center;
}

.effect {
    flex: 1;
    background: #dcfce7;
    padding: 12px;
    border-left: 4px solid #22c55e;
    border-radius: 6px;
}

.effect strong {
    color: #166534;
}

/* ===== CONTAINER STYLES ===== */
.max-w-7xl {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.bg-white {
    background-color: white;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.shadow-lg {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.p-8 {
    padding: 2rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* ===== HEADING STYLES ===== */
h1 {
    font-size: 1.875rem;
    font-weight: bold;
    color: #1e3a8a;
}

h2 {
    font-size: 1.875rem;
    font-weight: bold;
    color: #1e3a8a;
}

h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0891b2;
}

/* ===== GRID STYLES ===== */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.gap-8 {
    gap: 2rem;
}

/* ===== BUTTON STYLES ===== */
.inline-block {
    display: inline-block;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.rounded {
    border-radius: 0.25rem;
}

button, a.btn {
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    font-weight: bold;
}

/* ===== TEXT STYLES ===== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

/* ===== BACKGROUND COLORS ===== */
.bg-yellow-50 {
    background-color: #fefce8;
}

.bg-blue-900 {
    background-color: #1e3a8a;
}

.bg-blue-700 {
    background-color: #1d4ed8;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-cyan-700 {
    background-color: #0891b2;
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

/* ===== BORDER STYLES ===== */
.border-l-4 {
    border-left-width: 4px;
}

.border-yellow-600 {
    border-color: #ca8a04;
}

/* ===== TEXT COLORS ===== */
.text-white {
    color: white;
}

.text-gray-600 {
    color: #4b5563;
}

.text-yellow-800 {
    color: #713f12;
}

.text-yellow-900 {
    color: #713f12;
}

.text-blue-900 {
    color: #1e3a8a;
}

.text-purple-700 {
    color: #7c3aed;
}

.text-green-700 {
    color: #16a34a;
}

.text-cyan-700 {
    color: #0891b2;
}

/* ===== FLEXBOX STYLES ===== */
.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .causality-box {
        flex-direction: column;
    }

    .arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }

    .branch {
        flex-direction: column;
        align-items: center;
    }

    .grid-cols-1 {
        grid-template-columns: 1fr;
    }

    nav .flex {
        flex-direction: column;
    }

    nav a {
        width: 100%;
        text-align: center;
    }
}

/* ===== SCROLLBAR STYLES ===== */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #1e3a8a;
}
/* ===== QUIZ STYLES ===== */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.question-box {
    background: white;
    border-left: 4px solid #3b82f6;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.question-number {
    color: #1e3a8a;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
}

.question-text {
    color: #333;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    background: #f0f9ff;
    border: 2px solid #3b82f6;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    background: #e0f2fe;
    border-color: #0891b2;
}

.option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.option label {
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
}

.option.selected {
    background: #dbeafe;
    border-color: #1e40af;
    font-weight: 600;
}

.submit-btn {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.result-box {
    background: white;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin-top: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.result-perfect {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 2px solid #22c55e;
}

.result-good {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
}

.result-poor {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
}

.result-score {
    font-size: 48px;
    font-weight: bold;
    color: #1e3a8a;
    margin: 20px 0;
}

.progress-bar {
    background: #e5e7eb;
    height: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #3b82f6, #0891b2);
    height: 100%;
    transition: width 0.3s ease;
}
/* ========================================
   KVIZ STILOVI - Lekcija 3
   ======================================== */

/* Kviz Container */
.quiz-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
    width: 0%;
    transition: width 0.3s ease;
}

/* Question Box */
.question-box {
    background: white;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #3b82f6;
    transition: all 0.3s ease;
}

.question-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Question Number */
.question-number {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: bold;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Question Text */
.question-text {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Options Container */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

/* Option Styling */
.option {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.option label {
    display: flex;
    align-items: flex-start;
    margin: 0;
    padding: 15px 18px;
    cursor: pointer;
    border-radius: 8px;
    border: 2px solid #d1d5db;
    transition: all 0.3s ease;
    background-color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.5;
}

.option label:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
    transform: translateX(5px);
}

.option input[type="radio"] {
    margin-right: 15px;
    margin-top: 3px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Točan Odgovor - ZELENO */
.option-correct {
    background-color: #d1fae5 !important;
    border: 2px solid #10b981 !important;
    color: #065f46;
}

.option-correct label {
    background-color: #d1fae5 !important;
    border: 2px solid #10b981 !important;
    color: #065f46;
    font-weight: 600;
}

.option-correct label::after {
    content: " ✓ TOČNO";
    color: #10b981;
    font-weight: bold;
    margin-left: 10px;
}

/* Netočan Odgovor - CRVENO */
.option-incorrect {
    background-color: #fee2e2 !important;
    border: 2px solid #ef4444 !important;
    color: #7f1d1d;
}

.option-incorrect label {
    background-color: #fee2e2 !important;
    border: 2px solid #ef4444 !important;
    color: #7f1d1d;
    font-weight: 600;
}

.option-incorrect label::after {
    content: " ✗ NETOČNO";
    color: #ef4444;
    font-weight: bold;
    margin-left: 10px;
}

/* Disabled State */
.option-disabled {
    opacity: 0.8;
}

.option-disabled input[type="radio"] {
    pointer-events: none;
}

.option-disabled label {
    cursor: not-allowed;
}

/* Answer Feedback */
.answer-feedback {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    display: none;
}

.feedback-correct {
    background-color: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
    display: block;
}

.feedback-correct::before {
    content: "✓ ";
    font-weight: bold;
}

.feedback-incorrect {
    background-color: #fee2e2;
    color: #7f1d1d;
    border: 2px solid #ef4444;
    display: block;
}

.feedback-incorrect::before {
    content: "✗ ";
    font-weight: bold;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 40px;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #1e3a8a, #172554);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Result Box */
.result-box {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 3px solid #3b82f6;
}

.result-score {
    font-size: 3.5rem;
    font-weight: bold;
    color: #1e40af;
    margin: 20px 0;
}

.result-perfect {
    background: linear-gradient(135deg, #d1fae5, #bfdbfe) !important;
    border: 3px solid #10b981 !important;
}

.result-perfect .result-score {
    color: #10b981;
}

.result-good {
    background: linear-gradient(135deg, #bfdbfe, #fef3c7) !important;
    border: 3px solid #3b82f6 !important;
}

.result-good .result-score {
    color: #1e40af;
}

.result-poor {
    background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
    border: 3px solid #ef4444 !important;
}

.result-poor .result-score {
    color: #ef4444;
}

/* Result Message */
#resultMessage {
    font-size: 1.2rem;
    color: #374151;
    margin-bottom: 20px;
    line-height: 1.6;
}

#resultPercentage {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 30px;
}

/* Back Link in Results */
.result-box a {
    display: inline-block;
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.result-box a:hover {
    background: linear-gradient(135deg, #1e3a8a, #172554);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .question-box {
        padding: 18px;
    }

    .question-text {
        font-size: 1rem;
    }

    .option label {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .result-score {
        font-size: 2.5rem;
    }

    .result-box {
        padding: 30px 20px;
    }
}
