* {
    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: #f8f9fa;
    margin: 0;
    padding: 0;
}

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

h1, h2 {
    color: #3498db;
    margin-bottom: 0px;
}

/* Controls section */
.controls {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.controls button {
    padding: 8px 15px;
    margin-right: 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.shortcut-hint {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

kbd {
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    color: #333;
    display: inline-block;
    font-size: 0.85em;
    font-weight: 700;
    line-height: 1;
    margin: 0 0.2em;
    padding: 0.2em 0.6em;
}

/* Notebook container */
.notebook-container {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

/* Equation row */
.equation-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.row-number {
    width: 30px;
    text-align: center;
    font-weight: bold;
    color: #7f8c8d;
    margin-right: 10px;
}

.equation-container {
    display: flex;
    flex: 1;
    align-items: center;
}

.equation-side {
    flex: 1;
    width: 100%;
    min-height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    background-color: #f9f9f9;
}

.equation-equals {
    margin: 0 15px;
    font-size: 1.2em;
    color: #7f8c8d;
}

/* Math field styling */
.mq-editable-field {
    min-height: 30px;
    width: 100%;
    outline: none;
}

.mq-editable-field.mq-focused {
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

/* Delete icon */
.delete-icon {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.delete-icon:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .equation-container {
        flex-direction: column;
    }
    
    .equation-equals {
        margin: 10px 0;
    }
    
    .delete-icon {
        right: 5px;
        top: 5px;
        transform: none;
    }
    
    .delete-icon:hover {
        transform: scale(1.1);
    }
}

/* Navigation links */
.nav-links {
    margin-bottom: 0px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.nav-links a {
    text-decoration: none;
    color: #3498db;
    margin-right: 20px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: #f0f0f0;
}

.nav-links a.active {
    background-color: #3498db;
    color: white;
}

/* Calculator container */
.calculator-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.editor-section, .result-section {
    flex: 1;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* MathQuill editor */
.mathquill-editor {
    margin-bottom: 15px;
}

.math-field {
    min-height: 60px;
    width: 100%;
    padding: 10px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: monospace;
}

.editor-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Action controls */
.action-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.action-controls select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.result-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

/* Result display */
.result-display {
    min-height: 3rem;
    padding: 0.5rem;
    border: 1px solid #eee;
    border-radius: 4px;
}

.result-actions {
    display: flex;
    justify-content: flex-end;
}

/* Examples section */
.examples-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.example-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.example-btn {
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.example-btn:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.example-btn:active {
    background-color: #dee2e6;
}

/* Responsive design */
@media (max-width: 768px) {
    .calculator-container {
        flex-direction: column;
    }
    
    .editor-section, .result-section {
        width: 100%;
    }
}

/* MathLive specific styles */
.mathlive-editor {
    margin: 1rem 0;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
}

math-field {
    width: 100%;
    min-height: 2.5rem;
    font-size: 1.2rem;
    padding: 0.5rem;
    border: none;
    outline: none;
}

math-field:focus {
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

math-field[readonly] {
    background-color: #f8f9fa;
    cursor: default;
} 