/* Communication Swarms Page Styles */

/* Light background with dark text for learning environment */
body {
    background-color: #f8f9fa;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Hero section with gradient background */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.hero-section::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"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Breadcrumb navigation */
.breadcrumb-nav {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.breadcrumb {
    background: transparent;
    margin: 0;
}

/* Definition card styles */
.definition-section {
    padding: 80px 0;
    background: white;
}

.definition-card {
    background: #f8f9fa;
    border-left: 5px solid #667eea;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.definition-card h3 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 20px;
}

.definition-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* Examples section */
.examples-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 60px 0;
}

.example-item {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.example-item h5 {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Types section */
.types-section {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: block;
    margin: 20px auto 0;
    border-radius: 2px;
}

/* Data structure cards */
.ds-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    padding: 40px 30px;
    margin-bottom: 30px;
    cursor: pointer;
    height: 100%;
    border: 2px solid transparent;
    position: relative;
}

.ds-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.ds-card:hover::before {
    transform: scaleX(1);
}

.ds-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.ds-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ds-card h3 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 15px;
}

.ds-card p {
    color: #666;
    line-height: 1.8;
}

.btn-learn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-learn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    color: white;
}

/* Process steps section */
.process-steps-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.step-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.5rem;
    margin-right: 20px;
}

.step-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.step-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

/* Simulation section */
.simulation-section {
    padding: 80px 0;
    background: white;
}

.simulation-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.simulation-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
}

.control-group {
    flex: 1;
    min-width: 200px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.control-group input[type="range"] {
    width: 100%;
}

.control-value {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #667eea;
}

.simulation-canvas {
    background: white;
    border-radius: 10px;
    height: 400px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.simulation-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.btn-simulation {
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-start {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.btn-pause {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    color: white;
}

.btn-reset {
    background: linear-gradient(45deg, #dc3545, #e83e8c);
    color: white;
}

.btn-export {
    background: linear-gradient(45deg, #17a2b8, #6f42c1);
    color: white;
}

.btn-import {
    background: linear-gradient(45deg, #6c757d, #343a40);
    color: white;
}

.btn-simulation:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Footer section */
.footer-section {
    background: #2c3e50;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    margin-bottom: 30px;
}

.footer-content h3 {
    color: #667eea;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #bdc3c7;
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .step-title {
        font-size: 1.5rem;
    }
    
    .ds-card {
        padding: 25px 20px;
    }
    
    .simulation-controls {
        flex-direction: column;
    }
    
    .simulation-buttons {
        flex-wrap: wrap;
    }
    
    .btn-simulation {
        margin-bottom: 10px;
    }
}

/* Badge styles */
.badge {
    font-weight: 500;
    padding: 8px 12px;
}

.badge-primary {
    background-color: #667eea;
}

.badge-success {
    background-color: #28a745;
}

.badge-info {
    background-color: #17a2b8;
}

.badge-warning {
    background-color: #ffc107;
}

.badge-danger {
    background-color: #dc3545;
}

.badge-dark {
    background-color: #343a40;
}

.badge-secondary {
    background-color: #6c757d;
}

.badge-light {
    background-color: #f8f9fa;
    color: #333;
}

/* Animation classes */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Robot visualization styles */
.robot-node {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.robot-node:hover {
    transform: scale(1.2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.robot-node.active {
    background: linear-gradient(45deg, #28a745, #20c997);
    animation: pulse 1s infinite;
}

.robot-node.failed {
    background: linear-gradient(45deg, #dc3545, #e83e8c);
    opacity: 0.7;
}

.connection-line {
    position: absolute;
    background: rgba(102, 126, 234, 0.6);
    transform-origin: 0 0;
    z-index: 5;
    transition: all 0.3s ease;
}

.connection-line.active {
    background: rgba(40, 167, 69, 0.8);
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
}

.connection-line.failed {
    background: rgba(220, 53, 69, 0.5);
}

.obstacle {
    position: absolute;
    background: repeating-linear-gradient(
        45deg,
        #666,
        #666 10px,
        #888 10px,
        #888 20px
    );
    border-radius: 5px;
    opacity: 0.8;
}

/* Data visualization styles */
.metric-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin: 10px 0;
}

.metric-label {
    color: #666;
    font-weight: 500;
}

.progress-bar-container {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 5px;
    transition: width 0.5s ease;
}

/* Chart container */
.chart-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

/* Legend styles */
.legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

/* Modal styles */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    border: none;
}

.modal-title {
    font-weight: 600;
}

.close {
    color: white;
    opacity: 0.8;
}

.close:hover {
    color: white;
    opacity: 1;
}

/* Form styles */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Button styles */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Alert styles */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Tooltip styles */
.tooltip-inner {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
}