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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

h1, h2, h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

h1 {
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

p {
    margin-bottom: 15px;
}

/* Input Section */
.input-section {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    align-items: center;
}

.input-group {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

label {
    margin-bottom: 5px;
    font-weight: bold;
}

input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

button {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

#reset {
    background-color: #e74c3c;
}

#reset:hover {
    background-color: #c0392b;
}

#step {
    background-color: #2ecc71;
}

#step:hover {
    background-color: #27ae60;
}

/* Visualization Section */
.visualization-section {
    margin: 30px 0;
}

.formula-display {
    margin: 20px 0;
    padding: 15px;
    background-color: #f0f7fc;
    border-radius: 5px;
    font-family: monospace;
    font-size: 18px;
    min-height: 50px;
}

.steps-visualization {
    margin: 20px 0;
    min-height: 100px;
}

.step-item {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border-left: 5px solid #3498db;
    animation: fadeIn 0.5s ease-in-out;
}

.step-item.highlight {
    background-color: #e8f6fc;
    border-left-color: #2ecc71;
}

/* Animation for step visualization */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    background-color: #ecf0f1;
    border-radius: 5px;
}

.division-step {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 18px;
}

.division-step .number {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 5px;
    background-color: #e8f6fc;
    border-radius: 3px;
}

.division-step .operator {
    margin: 0 5px;
    font-weight: bold;
}

.quotient-remainder {
    margin-left: 15px;
    color: #7f8c8d;
}

.explanation {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.explanation ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.explanation li {
    margin-bottom: 10px;
}

.description {
    margin: 15px 0;
    text-align: center;
    font-style: italic;
    color: #7f8c8d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .input-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .input-group {
        width: 100%;
    }
    
    button {
        width: 100%;
        margin-top: 10px;
    }
} 