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

:root {
    --primary-color: #078282;
    --secondary-color: #38ADA9;
    --accent-color: #FF6B6B;
    --light-bg: #F5F5F5;
    --dark-text: #333;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: all 0.4s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;
    color: var(--dark-text);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, #FF8C42 100%);
    color: white;
    padding: 40px 0;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: headerGlow 8s ease-in-out infinite;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    font-weight: 700;
    letter-spacing: -0.5px;
    animation: slideInDown 0.6s ease-out;
}

.header .subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    animation: slideInUp 0.8s ease-out 0.2s both;
}

@keyframes headerGlow {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Educational Header Elements */
.header-description {
    font-size: 1rem;
    line-height: 1.6;
    margin: 15px 0 20px 0;
    opacity: 0.95;
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.header-description p {
    margin: 0;
}

.header-description strong {
    color: #fff;
    font-weight: 600;
}

/* Learning Badges */
.learning-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    animation: slideInUp 0.8s ease-out 0.6s both;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-students {
    background: rgba(74, 144, 226, 0.2);
    color: #fff;
}

.badge-engineers {
    background: rgba(56, 173, 169, 0.2);
    color: #fff;
}

.badge-educators {
    background: rgba(255, 152, 0, 0.2);
    color: #fff;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    transition: var(--transition);
}

/* Tips Section */
.tips-section {
    margin-bottom: 20px;
    animation: fadeIn 0.6s ease-out;
}

.tips-container {
    background: linear-gradient(135deg, #E8F4F8 0%, #F0F9FB 100%);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.tips-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, #FF8C42 100%);
    animation: shimmer 3s ease-in-out infinite;
}

.tips-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(7, 130, 130, 0.2);
}

.tips-icon {
    font-size: 1.2rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.tips-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tips-counter {
    margin-left: auto;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.tips-content {
    margin-bottom: 10px;
    animation: fadeIn 0.4s ease-out;
    min-height: 40px;
}

.tips-text {
    padding: 0;
}

.tips-text h4 {
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 4px;
    font-weight: 700;
}

.tips-text p {
    color: #555;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

.tips-footer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tips-prev,
.tips-next {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(7, 130, 130, 0.3);
    font-weight: bold;
}

.tips-prev:hover,
.tips-next:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(7, 130, 130, 0.5);
}

.tips-prev:active,
.tips-next:active {
    transform: scale(0.95);
}

.tips-progress {
    flex: 1;
    height: 6px;
    background: rgba(7, 130, 130, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.tips-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 3px;
    width: 0;
    transition: width 0.4s ease-out;
    box-shadow: 0 0 8px rgba(7, 130, 130, 0.5);
}

/* Control Panel */
.control-panel {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), height 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 0;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0);
    transition: background 0.3s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.btn:hover::after {
    background: rgba(255, 255, 255, 0.1);
}

.btn:active {
    animation: buttonPress 0.2s ease-out;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(7, 130, 130, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #056464 0%, #2d9a96 100%);
    box-shadow: 0 12px 32px rgba(7, 130, 130, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: var(--dark-text);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    color: var(--primary-color);
}

.btn-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.3);
}

.btn-info:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1a5f7a 100%);
    box-shadow: 0 12px 32px rgba(52, 152, 219, 0.5);
}

/* Models Container */
.models-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.model-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: var(--transition-smooth);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-section:hover {
    box-shadow: 0 16px 48px rgba(7, 130, 130, 0.15);
    transform: translateY(-5px);
    border-color: rgba(7, 130, 130, 0.3);
}

.model-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.4rem;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Layers Container */
.layers-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 600px;
    overflow-y: auto;
}

.layer {
    padding: 16px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-left: 5px solid transparent;
    border-right: 5px solid rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    animation: fadeInSlide 0.5s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-height: 60px;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.layer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.layer:hover {
    transform: translateX(10px) translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
    border-left-color: rgba(255, 255, 255, 0.9);
}

.layer:hover::before {
    opacity: 1;
}

.layer.active {
    border-left-color: #FF0000;
    box-shadow: 0 0 24px rgba(255, 0, 0, 0.7), inset 0 0 15px rgba(255, 0, 0, 0.2);
    transform: scale(1.06) translateX(10px);
    animation: layerActivePulse 0.6s ease-out;
}

@keyframes layerActivePulse {
    0% {
        transform: scale(0.98) translateX(0);
    }
    50% {
        transform: scale(1.08) translateX(10px);
    }
    100% {
        transform: scale(1.06) translateX(10px);
    }
}

.layer-number {
    font-size: 1rem;
    font-weight: 700;
    opacity: 1;
    position: relative;
    z-index: 1;
    min-width: 35px;
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
    margin-right: 12px;
}

.layer-name {
    flex: 1;
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1;
    font-size: 1rem;
}

.layer-unit {
    font-size: 0.9rem;
    opacity: 1;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
    margin-left: 12px;
}

/* Info Section */
.info-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.info-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.info-panel h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.info-content {
    flex: 1;
    overflow-y: auto;
}

.info-content h4 {
    color: var(--secondary-color);
    margin-top: 15px;
    margin-bottom: 8px;
}

.info-content ul {
    margin-left: 20px;
}

.info-content li {
    margin-bottom: 6px;
    line-height: 1.5;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 3px solid var(--border-color);
    background: linear-gradient(90deg, rgba(7, 130, 130, 0.02) 0%, transparent 100%);
}

.tab-button {
    padding: 15px 20px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    transition: var(--transition-smooth);
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 2px;
}

.tab-button:hover {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(7, 130, 130, 0.05) 0%, transparent 100%);
}

.tab-button:hover::after {
    width: 100%;
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-button.active::after {
    width: 100%;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    animation: slideDown 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Flow Container */
.flow-container {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.flow-visualization {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 20px 15px;
    background: linear-gradient(180deg, rgba(232, 244, 248, 0.5) 0%, rgba(240, 249, 251, 0.5) 100%);
    border-radius: 12px;
    position: relative;
}

.flow-wrapper {
    display: flex;
    gap: 0px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
    overflow-x: visible;
    overflow-y: visible;
    padding-bottom: 15px;
}

.flow-step-item {
    display: flex;
    align-items: center;
    flex-shrink: 1;
    gap: 4px;
    flex-grow: 1;
    justify-content: center;
    min-width: fit-content;
}

.flow-step {
    width: 120px;
    height: 120px;
    padding: 10px;
    background: linear-gradient(135deg, #E8F4F8 0%, #D0E8F0 100%);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(7, 130, 130, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.flow-step::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(7, 130, 130, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.flow-step:hover {
    background: linear-gradient(135deg, #D0E8F0 0%, #B8DFE8 100%);
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(7, 130, 130, 0.25);
    border-color: var(--secondary-color);
}

.flow-step-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flow-step-layer {
    font-size: 0.7rem;
    color: var(--secondary-color);
    margin-bottom: 4px;
    font-weight: 600;
    line-height: 1.2;
}

.flow-step-content {
    font-size: 0.7rem;
    color: #333;
    margin-bottom: 4px;
    font-weight: 700;
}

.flow-step-description {
    font-size: 0.6rem;
    color: #666;
    font-style: italic;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(7, 130, 130, 0.2);
    line-height: 1.2;
}

.flow-arrow-connector {
    flex-shrink: 0;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
    animation: arrowPulse 1.5s ease-in-out infinite;
    margin: 0 -2px;
}

@keyframes arrowPulse {
    0%, 100% {
        transform: scaleX(1) translateX(0);
        opacity: 0.7;
    }
    50% {
        transform: scaleX(1.15) translateX(2px);
        opacity: 1;
    }
}

.flow-bottom-line {
    position: absolute;
    bottom: 50px;
    left: 50px;
    right: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, #FF8C42 100%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(7, 130, 130, 0.3);
}

/* Mapping Section */
.mapping-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.mapping-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.mapping-table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
}

.mapping-table thead {
    background: linear-gradient(90deg, rgba(7, 130, 130, 0.08) 0%, rgba(56, 173, 169, 0.08) 100%);
}

.mapping-table th {
    padding: 12px 10px;
    text-align: left;
    color: var(--primary-color);
    font-weight: 700;
    border-bottom: 3px solid var(--primary-color);
    letter-spacing: 0.3px;
    font-size: 0.9rem;
    white-space: nowrap;
    min-width: 120px;
}

.mapping-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    font-size: 0.85rem;
}

.mapping-table tr:hover {
    background: linear-gradient(90deg, rgba(7, 130, 130, 0.05) 0%, rgba(56, 173, 169, 0.05) 100%);
    box-shadow: inset 0 0 20px rgba(7, 130, 130, 0.05);
}

.pdu-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FFE66D 0%, #FFC107 100%);
    color: #333;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
    overflow: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    margin: auto;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: 4px;
}

.close:hover {
    color: var(--primary-color);
    background: rgba(7, 130, 130, 0.1);
}

.help-content h3 {
    color: var(--primary-color);
    margin-top: 20px;
    margin-bottom: 10px;
}

.help-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.help-content li {
    margin-bottom: 8px;
}

.help-content code {
    background-color: var(--light-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: var(--accent-color);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .models-container {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .info-section {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .header .subtitle {
        font-size: 1rem;
    }

    .models-container {
        grid-template-columns: 1fr;
    }

    .control-panel {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .layer {
        padding: 14px 16px;
        min-height: 55px;
    }

    .layer-number {
        font-size: 0.9rem;
        min-width: 32px;
        padding: 3px 6px;
        margin-right: 10px;
    }

    .layer-name {
        font-size: 0.9rem;
    }

    .layer-unit {
        font-size: 0.8rem;
        padding: 3px 10px;
        margin-left: 10px;
    }

    .flow-visualization {
        flex-direction: column;
        padding: 15px 10px;
        overflow-x: hidden;
    }

    .flow-wrapper {
        gap: 0px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .flow-step {
        width: 100px;
        height: 100px;
        padding: 8px;
    }

    .flow-arrow-connector {
        font-size: 1.3rem;
        margin: 0 -1px;
    }

    .mapping-table {
        font-size: 0.8rem;
        overflow-x: auto;
        display: block;
    }

    .mapping-table th,
    .mapping-table td {
        padding: 8px 6px;
        font-size: 0.75rem;
        min-width: 100px;
    }

    .modal-content {
        width: 95%;
        margin: 20% auto;
    }
}

/* Enhanced Layer Information Styles */
.layer-section {
    background: linear-gradient(135deg, rgba(7, 130, 130, 0.06) 0%, rgba(56, 173, 169, 0.06) 100%);
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.layer-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(7, 130, 130, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.layer-section:hover {
    background: linear-gradient(135deg, rgba(7, 130, 130, 0.12) 0%, rgba(56, 173, 169, 0.12) 100%);
    border-left-color: var(--secondary-color);
    transform: translateX(8px);
    box-shadow: 0 8px 24px rgba(7, 130, 130, 0.1);
}

.layer-section:hover::before {
    opacity: 1;
}

.layer-description {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 140, 66, 0.1) 100%);
    border-left: 4px solid #FF6B6B;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-style: italic;
    position: relative;
    overflow: hidden;
}

.layer-description::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 107, 107, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.layer-description:hover::before {
    opacity: 1;
}

.layer-description p {
    margin: 0;
    line-height: 1.7;
    color: #333;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.layer-section h4 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.layer-section ul {
    margin-left: 20px;
    list-style: none;
    padding: 0;
}

.layer-section li {
    margin-bottom: 8px;
    padding-left: 8px;
    line-height: 1.6;
    color: #555;
}

.layer-section li:before {
    content: "→ ";
    color: var(--secondary-color);
    font-weight: bold;
    margin-right: 8px;
}

.info-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Scrollbar Styling */
.layers-container::-webkit-scrollbar,
.info-content::-webkit-scrollbar,
.flow-visualization::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.layers-container::-webkit-scrollbar-track,
.info-content::-webkit-scrollbar-track,
.flow-visualization::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 10px;
}

.layers-container::-webkit-scrollbar-thumb,
.info-content::-webkit-scrollbar-thumb,
.flow-visualization::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.layers-container::-webkit-scrollbar-thumb:hover,
.info-content::-webkit-scrollbar-thumb:hover,
.flow-visualization::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Message Animation Section */
.message-animation-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.9);
    margin: 40px 0;
    animation: fadeInUp 0.7s ease-out;
}

.message-animation-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.message-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    animation: slideInUp 0.6s ease-out 0.1s both;
}

.message-input {
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    width: 300px;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.message-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(7, 130, 130, 0.3);
    background: white;
    animation: inputGlow 0.4s ease-out;
}

@keyframes inputGlow {
    0% {
        box-shadow: 0 0 0 rgba(7, 130, 130, 0);
    }
    100% {
        box-shadow: 0 0 20px rgba(7, 130, 130, 0.3);
    }
}

.sender-receiver-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: start;
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.device-box {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 3px solid;
    transition: var(--transition-smooth);
    animation: scaleIn 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.device-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.device-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.device-box:hover::before {
    opacity: 1;
}

.sender-box {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8C42 100%);
    border-color: #FF6B6B;
}

.receiver-box {
    background: linear-gradient(135deg, #95E1D3 0%, #38ADA9 100%);
    border-color: #38ADA9;
}

.device-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    animation: bounce 1s ease-in-out infinite;
}

.device-label {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.device-message {
    font-size: 0.9rem;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    word-break: break-word;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.4s ease-out;
}

.sender-box .device-message {
    color: white;
}

.receiver-box .device-message {
    color: #fff;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Network Animation Area */
.network-animation-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.animation-canvas {
    background: linear-gradient(135deg, #f8fafb 0%, #f0f4f7 100%);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.animation-canvas::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(7, 130, 130, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(56, 173, 169, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.network-svg {
    width: 100%;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

/* Layer Details Animation */
.layer-details-animation {
    background: linear-gradient(135deg, #E8F4F8 0%, #F0F9FB 100%);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 20px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

.layer-details-animation::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(7, 130, 130, 0.1) 50%, transparent 100%);
    animation: shimmer 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0;
        transform: translateX(-100%);
    }
    50% {
        opacity: 1;
        transform: translateX(100%);
    }
}

.layer-detail-box {
    width: 100%;
    position: relative;
    z-index: 1;
}

.layer-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    animation: slideInDown 0.4s ease-out;
}

.layer-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333 !important;
}

.layer-number {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(7, 130, 130, 0.3);
}

.layer-info-body {
    padding-top: 10px;
    animation: slideUp 0.4s ease-out 0.1s both;
}

.layer-action {
    margin-bottom: 8px;
    font-weight: 600;
    color: #333 !important;
}

.animation-description {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.08) 0%, rgba(255, 140, 66, 0.08) 100%);
    border-left: 4px solid #FF6B6B;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    animation: slideInLeft 0.4s ease-out;
}

.animation-description strong {
    color: #FF6B6B;
    font-weight: 600;
}

.animation-description p {
    margin: 8px 0 0 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
}

.animation-action {
    background: linear-gradient(135deg, rgba(7, 130, 130, 0.08) 0%, rgba(56, 173, 169, 0.08) 100%);
    border-left: 4px solid var(--primary-color);
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    animation: slideInLeft 0.4s ease-out 0.1s both;
}

.animation-action strong {
    color: var(--primary-color);
    font-weight: 600;
}

.animation-action p {
    margin: 8px 0 0 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
}

.animation-data {
    background: linear-gradient(135deg, rgba(255, 230, 109, 0.08) 0%, rgba(255, 140, 66, 0.08) 100%);
    border-left: 4px solid #FFE66D;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    animation: slideInLeft 0.4s ease-out 0.2s both;
}

.animation-data strong {
    color: #FFE66D;
    font-weight: 600;
}

.animation-data p {
    margin: 8px 0 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.animation-examples {
    background: linear-gradient(135deg, rgba(149, 225, 211, 0.08) 0%, rgba(56, 173, 169, 0.08) 100%);
    border-left: 4px solid #95E1D3;
    padding: 12px;
    border-radius: 6px;
    animation: slideInLeft 0.4s ease-out 0.3s both;
}

.animation-examples strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.animation-examples ul {
    margin: 8px 0 0 20px;
    list-style: none;
}

.animation-examples li {
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

.animation-examples li:before {
    content: "✓ ";
    color: #95E1D3;
    font-weight: bold;
    margin-right: 8px;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.layer-data {
    font-size: 0.9rem;
    color: #333 !important;
    font-family: 'Courier New', monospace;
    background: white;
    padding: 10px;
    border-radius: 6px;
    word-break: break-all;
    border-left: 4px solid var(--primary-color);
}

/* Message Status */
.message-status-container {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(7, 130, 130, 0.05) 0%, rgba(56, 173, 169, 0.05) 100%);
    border-radius: 10px;
    border: 1px solid rgba(7, 130, 130, 0.1);
}

.status-progress {
    width: 100%;
    height: 28px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(7, 130, 130, 0.3);
}

.status-text {
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    animation: statusPulse 1.5s ease-in-out infinite;
}

/* Responsive Design for Message Section */
@media (max-width: 1024px) {
    .sender-receiver-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .message-input {
        width: 100%;
    }

    .message-input-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .message-animation-section {
        padding: 20px;
    }

    .message-input {
        width: 100%;
    }

    .sender-receiver-container {
        grid-template-columns: 1fr;
    }

    .device-box {
        min-width: 100px;
    }

    .device-icon {
        font-size: 2rem;
    }

    .animation-canvas {
        min-height: 250px;
        padding: 10px;
    }

    .network-svg {
        max-width: 100%;
    }
}

/* Message Bubble Animations */
.message-bubble {
    animation: messageBounce 0.6s ease-in-out;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

@keyframes messageBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes messageFloat {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0.8;
        transform: translateX(320px);
    }
}

@keyframes messageFloatReverse {
    0% {
        opacity: 1;
        transform: translateX(320px);
    }
    100% {
        opacity: 0.8;
        transform: translateX(0);
    }
}

.message-bubble.sending {
    animation: messageFloat 2s ease-in-out forwards;
}

.message-bubble.receiving {
    animation: messageFloatReverse 2s ease-in-out forwards;
}

/* Enhanced Animations Collection */

/* Layer Glow Effect */
@keyframes layerGlow {
    0%, 100% {
        box-shadow: 0 0 0 rgba(7, 130, 130, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(7, 130, 130, 0.8), inset 0 0 15px rgba(7, 130, 130, 0.3);
    }
}

.layer.highlighting {
    animation: layerGlow 0.8s ease-in-out;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Color Pulse Animation */
@keyframes colorPulse {
    0%, 100% {
        background-color: rgba(7, 130, 130, 0.1);
    }
    50% {
        background-color: rgba(7, 130, 130, 0.3);
    }
}

/* Rotation/Spin Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Status Pulse Animation */
@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* ===== END ANIMATIONS ===== */

/* Session 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.6);
    overflow: auto;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    margin: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--primary-color);
}

.session-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.option-box {
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #f8f8f8;
}

.option-box h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.input-field {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.9rem;
    margin-left: auto;
}

#participantsPanel {
    margin-top: 20px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 5px;
}

#participantsList {
    list-style: none;
}

#participantsList li {
    padding: 8px;
    margin: 5px 0;
    background: white;
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
}

/* Protocol Link Styling */
.protocol-link {
    color: var(--primary-color);
    background: transparent;
    border: none;
    cursor: pointer !important;
    font-weight: 600;
    transition: var(--transition);
    padding: 0;
    font-size: inherit;
    display: inline;
    text-decoration: none;
    pointer-events: auto !important;
    z-index: 100;
    position: relative;
}

.protocol-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
    transform: scale(1.05);
}

.protocol-link:active {
    color: var(--accent-color);
}

.protocol-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Make parent list items also interactive */
.protocols-list li {
    pointer-events: auto;
}

.protocols-list li .protocol-link {
    cursor: pointer;
}

/* Protocols List */
.protocols-list {
    list-style: none;
    padding: 0;
}

.protocols-list li {
    padding: 8px 12px;
    margin: 5px 0;
    background: linear-gradient(90deg, rgba(7, 130, 130, 0.05) 0%, transparent 100%);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
}

.protocols-list li:hover {
    background: linear-gradient(90deg, rgba(7, 130, 130, 0.1) 0%, transparent 100%);
    transform: translateX(5px);
    transition: var(--transition);
}

/* Data Format Standards List */
.standards-list {
    list-style: none;
    padding: 0;
}

.standards-list li {
    padding: 8px 12px;
    margin: 5px 0;
    background: linear-gradient(90deg, rgba(200, 200, 200, 0.08) 0%, transparent 100%);
    border-left: 3px solid #999;
    border-radius: 4px;
    color: #555;
}

.format-standard {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #666;
    padding: 2px 6px;
    background-color: rgba(200, 200, 200, 0.15);
    border-radius: 3px;
    display: inline-block;
    user-select: none;
    cursor: default;
}

.standards-list li:hover {
    background: linear-gradient(90deg, rgba(200, 200, 200, 0.12) 0%, transparent 100%);
    /* No transform on hover - these are non-interactive */
}

/* Educational Content Styles */
.layer-education-header {
    background: linear-gradient(135deg, rgba(7, 130, 130, 0.15) 0%, rgba(56, 173, 169, 0.1) 100%);
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 15px;
}

.layer-education-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Learning Objectives */
.learning-objectives {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08) 0%, rgba(74, 144, 226, 0.03) 100%);
    border-left: 4px solid #4A90E2;
    padding: 12px 16px;
}

.learning-objectives ul {
    margin: 10px 0 0 0;
    padding-left: 25px;
}

.learning-objectives li {
    margin-bottom: 8px;
    color: #333;
    line-height: 1.5;
}

.learning-objectives li:before {
    content: "✓";
    color: #4A90E2;
    font-weight: bold;
    margin-right: 8px;
}

/* Career Relevance */

/* Teaching Tips */
.teaching-tip {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(76, 175, 80, 0.03) 100%);
    border-left: 4px solid #4CAF50;
    padding: 12px 16px;
    border-radius: 6px;
}

.teaching-tip p {
    margin: 0;
    color: #333;
    font-style: italic;
    line-height: 1.6;
}

/* Protocol Modal */
.protocol-modal {
    z-index: 1001;
}

.protocol-modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    border-radius: 10px;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.protocol-detail-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.protocol-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 30px;
    border-radius: 10px 10px 0 0;
    border-bottom: 3px solid var(--accent-color);
    position: relative;
}

.protocol-header h2 {
    margin: 0 0 15px 0;
    font-size: 2rem;
    font-weight: 700;
}

.protocol-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.protocol-layer,
.protocol-osi {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.protocol-content {
    padding: 30px;
    flex-grow: 1;
}

.protocol-section {
    margin-bottom: 30px;
}

.protocol-section h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.protocol-section p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 10px;
}

.protocol-points-list {
    list-style: none;
    padding: 0;
}

.protocol-points-list li {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #f5f5f5;
    border-left: 4px solid var(--accent-color);
    border-radius: 5px;
    line-height: 1.6;
    color: #333;
    transition: var(--transition);
}

.protocol-points-list li:hover {
    background: #eee;
    transform: translateX(5px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.protocol-ports-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.port-badge {
    background: linear-gradient(135deg, #FFE66D 0%, #FFD93D 100%);
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.protocol-list {
    list-style: none;
    padding: 0;
}

.protocol-list li {
    padding: 10px 15px;
    margin-bottom: 8px;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 5px;
    color: #333;
}

.protocol-alternatives-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.alternative-btn {
    background: linear-gradient(135deg, var(--secondary-color) 0%, teal 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.alternative-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Educational Protocol Sections */
.protocol-education {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08) 0%, rgba(100, 181, 246, 0.05) 100%);
    border-left: 4px solid #4A90E2;
    border-radius: 6px;
    padding: 15px 18px;
}

.protocol-education-content p {
    color: #333;
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
}

.protocol-importance {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(129, 199, 132, 0.05) 100%);
    border-left: 4px solid #4CAF50;
    border-radius: 6px;
    padding: 15px 18px;
}

.protocol-importance-content p {
    color: #333;
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
}

.protocol-actions {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    background: #f9f9f9;
    border-radius: 0 0 10px 10px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close-protocol {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    background: rgba(0,0,0,0.2);
    padding: 5px 10px;
    border-radius: 5px;
    line-height: 1;
    border: none;
}

.close-protocol:hover,
.close-protocol:focus {
    color: var(--accent-color);
    background: rgba(0,0,0,0.4);
    text-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* Protocol Modal Scrollbar */
.protocol-modal-content::-webkit-scrollbar {
    width: 8px;
}

.protocol-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.protocol-modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.protocol-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Mobile Responsive Improvements */
@media (max-width: 768px) {
    .session-options {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 20% auto;
    }

    .protocol-modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 80vh;
    }
    
    .header {
        padding: 15px 0;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .control-panel {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }

    .protocol-header {
        padding: 20px;
    }

    .protocol-header h2 {
        font-size: 1.5rem;
    }

    .protocol-content {
        padding: 20px;
    }

    .protocol-meta {
        flex-direction: column;
        gap: 8px;
    }

        .protocol-layer,
        .protocol-osi {
            width: 100%;
            text-align: center;
        }
    }