:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #34495e;
    --success: #2ecc71;
    --warning: #f39c12;
    --info: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--primary);
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.description {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 20px;
}

.control-panel {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input, select, button {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

button {
    background-color: var(--secondary);
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 600;
}

button:hover {
    background-color: var(--primary);
}

.process-input-header {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: bold;
}

.process-input-header div {
    flex: 1;
    text-align: center;
    padding: 5px;
    background-color: var(--light);
    border-radius: 5px;
}

.process-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.process-input input {
    flex: 1;
}

.process-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
}

.process-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.process-item:last-child {
    border-bottom: none;
}

.animation-container {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.animation-canvas {
    width: 100%;
    height: 300px;
    background-color: var(--light);
    border-radius: 5px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.controls button {
    width: auto;
    padding: 8px 15px;
}

.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--dark);
}

.timeline-container {
    margin-top: 20px;
}

.timeline {
    height: 60px;
    background-color: var(--light);
    border-radius: 5px;
    position: relative;
    margin-bottom: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}

.timeline-marker {
    display: inline-block;
    height: 100%;
    position: relative;
    text-align: center;
    color: white;
    font-weight: bold;
    transition: all 0.3s;
}

.timeline-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-slider {
    flex: 1;
}

.export-options {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.export-options button {
    flex: 1;
}

.color-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.process-state-container {
    position: relative;
}

.active-indicator {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: #e74c3c;
    font-weight: bold;
    font-size: 18px;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: var(--dark);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Screenshot notification styles */
.screenshot-notification {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.screenshot-success {
    background-color: #27ae60 !important;
}

.screenshot-error {
    background-color: #e74c3c !important;
}

.screenshot-info {
    background-color: #3498db !important;
}

/* Loading state for screenshot button */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Enhanced export options styling */
.export-options {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.export-options button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.export-options button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Print styles for better screenshot quality */
@media print {
    .container {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 10px !important;
    }
    
    .control-panel, .animation-container {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    button {
        display: none !important;
    }
}