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

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

h3 {
    color: #444;
    margin-bottom: 10px;
}

.controls {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.balls-input {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ball-1 .card-title {
    color: #d32f2f;
}

.ball-2 .card-title {
    color: #1976d2;
}

.input-group {
    margin-bottom: 15px;
    flex: 1;
}

.speed-control {
    text-align: center;
    background-color: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

input[type="number"] {
    width: 150px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: block;
    margin: 20px auto 0;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

.canvas-container {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: #fcfcfc;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

canvas {
    width: 100% !important;
    height: 100% !important;
}

#results {
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

#results .card {
    height: 100%;
}

.result-card {
    background-color: #fff;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.result-card h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.result-card p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.difference {
    background-color: #e8f5e9;
    border-left: 4px solid #4CAF50;
    padding: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .canvas-container {
        height: 300px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .canvas-container {
        height: 250px;
    }
    
    .controls {
        padding: 1rem !important;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

.math {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.math p {
    margin-bottom: 8px;
}

.math p:last-child {
    margin-bottom: 0;
}

h4 {
    color: #2e7d32;
    margin-top: 20px;
    margin-bottom: 15px;
}

.card-title {
    color: #1976d2;
} 