/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 50%, #3182ce 100%);
    min-height: 100vh;
    color: #333;
}

/* Header Styles */
.main-header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-branding {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.icn-logo {
    display: flex;
    align-items: center;
}

.icn-logo-image {
    height: 90px;
    width: auto;
    object-fit: contain;
}

.exercise-title h2 {
    color: white;
    font-weight: 600;
    font-size: 1.3rem;
    margin: 0;
}

.exercise-title .scenario-subtitle {
    color: white;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

.progress-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    transition: width 0.3s ease;
    width: 0%;
}

/* Main View Styles */
.main-view {
    max-width: 100vw;
    margin: 0;
    padding: 0;
    display: none;
    position: relative;
}

.main-view.active {
    display: block;
}

.floor-plan-container {
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.floor-plan-header {
    padding: 1rem;
    background: linear-gradient(135deg, #2b6cb0, #2c5282);
    color: white;
    text-align: center;
    border-bottom: 3px solid #3182ce;
}

.floor-plan-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.floor-plan-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.floor-plan-wrapper {
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

#floor-plan-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Role-Based Hotspot Styles */
.role-hotspot {
    background: linear-gradient(135deg, rgba(229, 62, 62, 0.2), rgba(197, 48, 48, 0.3));
    border: 3px solid rgba(229, 62, 62, 0.4);
    backdrop-filter: blur(8px);
}

.role-hotspot:hover {
    border-color: #e53e3e;
    background: linear-gradient(135deg, rgba(229, 62, 62, 0.3), rgba(197, 48, 48, 0.4));
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(229, 62, 62, 0.4);
}

.role-hotspot .hotspot-label {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #e53e3e;
    padding: 1rem;
    border-radius: 12px;
}

.role-hotspot .hotspot-label small {
    display: block;
    font-size: 0.75rem;
    color: #718096;
    margin-top: 0.25rem;
    font-style: italic;
}

.scenario-info {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.info-panel {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(229, 62, 62, 0.4);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.info-panel h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.info-panel p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.info-panel strong {
    color: #fed7d7;
}

.icn-attribution {
    background: rgba(43, 108, 176, 0.1);
    border-left: 4px solid #2b6cb0;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 0 8px 8px 0;
}

.icn-attribution p {
    margin: 0;
    color: white;
    font-size: 0.9rem;
}

.icn-attribution a {
    color: #bee3f8;
    text-decoration: none;
    font-weight: 600;
}

.icn-attribution a:hover {
    color: #90cdf4;
    text-decoration: underline;
}

.attack-scenario {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.attack-scenario h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.attack-scenario p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Hotspot Styles */
.hotspot {
    position: absolute;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    backdrop-filter: blur(5px);
}

.hotspot:hover {
    border-color: #4299e1;
    background: transparent;
    transform: scale(1.05);
    z-index: 10;
}

.hotspot-label {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    font-weight: 500;
    color: #2d3748;
    min-width: 120px;
}

.hotspot-label span {
    display: block;
    font-size: 0.9rem;
}

.completion-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.completion-badge.completed {
    background: #48bb78;
    color: white;
}

.completion-badge.completed::before {
    content: "✓";
}

/* Instructions Styles */
.instructions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: rgba(247, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e2e8f0;
    max-height: 30vh;
    overflow-y: auto;
    z-index: 50;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.instructions h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.instructions p {
    margin-bottom: 1rem;
    color: #4a5568;
    line-height: 1.6;
}

.instructions ul {
    color: #4a5568;
    padding-left: 2rem;
    line-height: 1.8;
}

.instructions li {
    margin-bottom: 0.5rem;
}

/* Department View Styles */
.scenario-view {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: none;
}

.scenario-view.active {
    display: block;
}

.scenario-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.back-button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #2d3748;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#scenario-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
}

.scenario-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    min-height: 600px;
}

.scenario-description {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 12px;
    border-left: 4px solid #4299e1;
}

.scenario-description h3 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 1.3rem;
}

.scenario-description p {
    margin: 0;
    color: #4a5568;
    line-height: 1.6;
}

.department-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #4a5568;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.tab-button.active {
    color: #2b6cb0;
    border-bottom-color: #2b6cb0;
    background: rgba(43, 108, 176, 0.05);
}

.tab-button:hover {
    color: #2b6cb0;
    background: rgba(43, 108, 176, 0.05);
}

.dept-content {
    min-height: 400px;
}

.dept-section {
    margin-bottom: 2rem;
}

.dept-section h4 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.actions-list {
    background: rgba(229, 62, 62, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #e53e3e;
    margin-bottom: 1.5rem;
}

.actions-list ul {
    margin: 0;
    padding-left: 1.5rem;
}

.actions-list li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #2d3748;
}

.video-section {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.video-placeholder {
    background: #e2e8f0;
    height: 200px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    font-weight: 500;
}

.questions-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
}

.question {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #4299e1;
}

.question h5 {
    margin-bottom: 1rem;
    color: #2d3748;
}

.question-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.question-options li {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.question-options li:hover {
    background: rgba(66, 153, 225, 0.1);
}

.question-options input[type="radio"] {
    margin-right: 0.5rem;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1000;
}

.loading-screen.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-screen p {
    color: #4a5568;
    font-weight: 500;
}

/* Exercise Styles */
.exercise-container {
    margin-bottom: 2rem;
}

.exercise-header {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    padding: 1.5rem;
    border-radius: 8px 8px 0 0;
}

.exercise-content {
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.target-skills {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.target-skills h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.target-skills ul {
    margin: 0;
    padding-left: 1.5rem;
}

.target-skills li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.exercise-questions {
    margin-top: 2rem;
}

.question {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #4299e1;
}

.question h4 {
    margin-bottom: 1rem;
    color: #2d3748;
}

.question-options {
    list-style: none;
}

.question-options li {
    margin-bottom: 0.5rem;
}

.question-options input[type="radio"] {
    margin-right: 0.5rem;
}

.complete-button {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    margin-top: 2rem;
}

.complete-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.complete-button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.floor-plan-container:hover .instructions {
    transform: translateY(0);
}

.instructions:hover {
    transform: translateY(0);
}

/* Developer Credits Footer */
.developer-credits {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    margin-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.credits-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    font-size: 0.9rem;
    color: #4a5568;
}

.developer-list {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.developer-list span {
    color: #2d3748;
    font-weight: 500;
}

.developer-list a {
    color: #2b6cb0;
    text-decoration: none;
    font-weight: 500;
}

.developer-list a:hover {
    text-decoration: underline;
    color: #1e4a72;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .main-header h1 {
        font-size: 1.2rem;
    }

    .progress-bar {
        width: 150px;
    }

    .main-view,
    .department-view {
        margin: 1rem auto;
        padding: 0 1rem;
    }

    .floor-plan-header {
        padding: 1.5rem;
    }

    .floor-plan-header h2 {
        font-size: 1.4rem;
    }

    .instructions {
        padding: 1.5rem;
    }

    .department-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .department-content {
        padding: 1.5rem;
    }

    .hotspot-label {
        padding: 0.5rem;
        min-width: 80px;
        font-size: 0.8rem;
    }

    .hotspot-label span {
        font-size: 0.8rem;
    }
}

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

    .hotspot-label {
        padding: 0.4rem;
        min-width: 60px;
    }

    .hotspot-label span {
        font-size: 0.7rem;
    }

    #department-title {
        font-size: 1.4rem;
    }
}