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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    min-height: 100vh;
    padding: 20px;
}

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

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(90deg, #4a90e2 0%, #357abd 100%);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.architecture-container {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 40px; /* Increased from 30px */
    margin-bottom: 40px;
}

/* Left Panel - System Interface */
.system-interface {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(74, 144, 226, 0.3);
    height: fit-content;
}

.interface-title {
    font-size: 1.4em;
    color: #4a90e2;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.interface-module {
    background: linear-gradient(135deg, #d4a574 0%, #c8956d 100%);
    color: #2c1810;
    padding: 15px;
    margin: 15px 0; /* Increased from 10px */
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.interface-module:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.4);
}

/* Main Backplane */
.backplane-container {
    background: rgba(255,255,255,0.05);
    border: 3px solid #4a90e2;
    border-radius: 20px;
    padding: 30px;
    position: relative;
}

.backplane-title {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #4a90e2;
    color: white;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.2em;
}

/* Top Modules Row */
.top-modules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px; /* Increased from 20px */
    margin-bottom: 30px;
}

.reconfig-handler {
    background: linear-gradient(135deg, #a8d8ea 0%, #7fb3d3 100%);
    color: #1a365d;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #4a90e2;
}

.power-mgmt {
    background: linear-gradient(135deg, #ffb3ba 0%, #ff9aa2 100%);
    color: #8b1538;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #d63384;
}

.module-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 15px;
    text-align: center;
}

.sub-modules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px; /* Increased from 10px */
}

.sub-module {
    background: rgba(255,255,255,0.2);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.sub-module:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* Connection Lines */
.spi-connection {
    text-align: center;
    margin: 25px 0; /* Increased from 20px */
    font-weight: bold;
    color: #4a90e2;
    position: relative;
}

.spi-connection::before,
.spi-connection::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 100px;
    height: 2px;
    background: #4a90e2;
}

.spi-connection::before {
    left: 0;
}

.spi-connection::after {
    right: 0;
}

/* Hybrid Processing System */
.hybrid-system {
    border: 3px dashed #4a90e2;
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0; /* Increased from 20px */
    background: rgba(74, 144, 226, 0.05);
}

.hybrid-title {
    text-align: center;
    color: #4a90e2;
    font-weight: bold;
    margin-bottom: 25px; /* Increased from 20px */
}

.processing-modules {
    display: grid;
    grid-template-columns: 2fr 2fr;
    gap: 30px; /* Increased from 20px */
}

.fpga-module {
    background: linear-gradient(135deg, #a8d8ea 0%, #7fb3d3 100%);
    color: #1a365d;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #4a90e2;
}

.analog-module {
    background: linear-gradient(135deg, #c8a2c8 0%, #b794b7 100%);
    color: #4a1a4a;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #8e44ad;
}

.fpga-components {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px; /* Increased from 8px */
    margin-top: 15px;
}

.analog-components {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px; /* Increased from 8px */
    margin-top: 15px;
}

.component {
    background: rgba(255,255,255,0.3);
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.8em;
    transition: all 0.3s ease;
}

.component:hover {
    background: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

/* Bus Connections */
.bus-info {
    text-align: center;
    margin: 20px 0; /* Increased from 15px */
    font-size: 0.9em;
    color: #4a90e2;
    font-style: italic;
}

/* Bottom Section */
.bottom-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px; /* Increased from 20px */
    margin-top: 35px; /* Increased from 30px */
}

.reconfigurable-bus {
    background: rgba(212, 165, 116, 0.2);
    border: 2px solid #d4a574;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.payload-interface {
    background: linear-gradient(135deg, #d4a574 0%, #c8956d 100%);
    color: #2c1810;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    font-weight: bold;
    position: relative;
}

/* CubeSat Subsystems */
.cubesat-section {
    margin-top: 45px; /* Increased from 40px */
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #4a90e2;
}

.cubesat-title {
    text-align: center;
    font-size: 1.3em;
    color: #4a90e2;
    margin-bottom: 25px; /* Increased from 20px */
    font-weight: bold;
}

.cubesat-modules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px; /* Increased from 20px */
}

.cubesat-module {
    background: linear-gradient(135deg, #a8d8ea 0%, #7fb3d3 100%);
    color: #1a365d;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.cubesat-module:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

/* Connection Arrow */
.connection-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 0; /* Increased from 20px */
}

.arrow {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 20px solid #4a90e2;
    margin: 0 10px;
}

.arrow-up {
    border-top: none;
    border-bottom: 20px solid #4a90e2;
}

/* Status Indicators */
.status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #28a745;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .architecture-container {
        grid-template-columns: 1fr;
        gap: 30px; /* Adjusted for mobile */
    }
    
    .processing-modules {
        grid-template-columns: 1fr;
        gap: 20px; /* Adjusted for mobile */
    }
    
    .cubesat-modules {
        grid-template-columns: 1fr;
        gap: 20px; /* Adjusted for mobile */
    }
}

@media (max-width: 768px) {
    .top-modules {
        grid-template-columns: 1fr;
        gap: 20px; /* Adjusted for mobile */
    }
    
    .fpga-components,
    .analog-components {
        grid-template-columns: 1fr 1fr;
        gap: 10px; /* Adjusted for mobile */
    }
    
    .bottom-section {
        grid-template-columns: 1fr;
        gap: 20px; /* Adjusted for mobile */
    }
}

/* Interactive Features */
.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.clickable:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

.active {
    border: 3px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}