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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

.panel {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.panel h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.panel h3 {
    color: #555;
    margin-bottom: 10px;
    font-size: 1.1em;
}

/* S-Plane Panel */
.s-plane-panel {
    display: flex;
    flex-direction: column;
}

.info-display {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.value-display, .vector-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 1.2em;
}

.label {
    color: #666;
    font-weight: 500;
}

.value {
    color: #667eea;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    min-width: 60px;
}

#sPlaneCanvas {
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: crosshair;
    display: block;
    margin: 0 auto;
}

.axis-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

.y-axis-label {
    transform: rotate(-90deg);
    position: relative;
    left: -200px;
    top: -250px;
}

/* Time Domain Panel */
.time-domain-panel {
    display: flex;
    flex-direction: column;
}

.formula-display {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.formula, .formula-expanded {
    font-size: 1.3em;
    margin: 8px 0;
    color: #333;
}

.formula-expanded {
    font-size: 1.1em;
    color: #666;
}

.formula span, .formula-expanded span {
    color: #667eea;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.plot-container {
    margin-bottom: 20px;
}

.plot-container canvas {
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    display: block;
    width: 100%;
}

.stability-indicator {
    background: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

.stability-value {
    font-size: 1.2em;
    font-weight: 700;
    padding: 5px 15px;
    border-radius: 5px;
}

.stability-value.stable {
    color: #28a745;
    background: #d4edda;
}

.stability-value.unstable {
    color: #dc3545;
    background: #f8d7da;
}

.stability-value.marginal {
    color: #ffc107;
    background: #fff3cd;
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
    border-top: 2px solid #e9ecef;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .y-axis-label {
        display: none;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 0.9em;
    }
    
    .panel {
        padding: 15px;
    }
    
    #sPlaneCanvas {
        width: 100%;
        height: auto;
    }
}