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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #333;
    min-height: 100vh;
}

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

h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.main-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.animation-area {
    flex: 1;
    background: #000;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#animationCanvas {
    display: block;
    margin: 0 auto;
    border-radius: 10px;
    background: #000;
}

.fps-display {
    text-align: center;
    margin-top: 15px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

.jitter-display {
    text-align: center;
    margin-top: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
}

.controls {
    flex: 0 0 500px;
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-height: 700px;
    overflow-y: auto;
}

.control-section h3 {
    margin-bottom: 20px;
    color: #2a5298;
    font-size: 1.3rem;
}

.velocity-control {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 8px;
    border: 2px solid #e0e4ff;
}

.velocity-control label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2a5298;
    font-size: 14px;
}

.velocity-control input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.velocity-control input:focus {
    outline: none;
    border-color: #2a5298;
}

.frame-delay-grid {
    margin-bottom: 20px;
}

.grid-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #2a5298;
}

.header-cell {
    padding: 8px;
    background: #f0f4ff;
    border-radius: 5px;
    text-align: center;
}

.frame-delay-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
}

.frame-delay-row input {
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.frame-delay-row input:focus {
    outline: none;
    border-color: #2a5298;
}

.remove-row-btn {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.remove-row-btn:hover {
    background: #ff3742;
}

.control-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.control-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    flex: 1;
}

#addRowBtn {
    background: #2ed573;
    color: white;
}

#addRowBtn:hover {
    background: #26d0ce;
}

#clearAllBtn {
    background: #ffa502;
    color: white;
}

#clearAllBtn:hover {
    background: #ff9500;
}

#startStopBtn {
    background: #2a5298;
    color: white;
}

#startStopBtn:hover {
    background: #1e3c72;
}

#startStopBtn.running {
    background: #ff4757;
}

#startStopBtn.running:hover {
    background: #ff3742;
}

.checkbox-control {
    margin-bottom: 20px;
}

.checkbox-control label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #2a5298;
    padding: 10px;
    background: #f8f9ff;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.checkbox-control label:hover {
    background: #f0f4ff;
}

.checkbox-control input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2a5298;
    cursor: pointer;
}

.checkbox-control span {
    font-size: 14px;
}

.info-section {
    margin-top: 30px;
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.info-section h3 {
    margin-bottom: 15px;
    color: #2a5298;
}

.info-section p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

.info-section ul {
    padding-left: 20px;
    line-height: 1.8;
    color: #555;
}

.info-section li {
    margin-bottom: 8px;
}

@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }
    
    .controls {
        flex: none;
        width: 100%;
    }
    
    #animationCanvas {
        width: 100%;
        max-width: 600px;
        height: auto;
    }
} 