/* Base Styles */
.calculator-hub-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.calc-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    padding: 2rem;
}

h2 {
    color: #2d3748;
    margin: 0 0 1.5rem;
    font-size: 1.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #e2e8f0;
}

.input-group {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 1.5rem;
}

/* Inputs & Dropdowns */
input, select {
    padding: 0.75rem 1rem;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
    outline: none;
}

select {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%234a5568"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 0.75rem center/16px;
    appearance: none;
}

/* Buttons */
.calc-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.percent-btn { background: #4a5568; color: white; }
.subtract-btn { background: #e53e3e; color: white; }
.add-btn { background: #48bb78; color: white; }

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Results & History */
.result-box {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-top: 1.5rem;
    font-size: 1.25rem;
    color: #2b6cb0;
}

.history-container {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(10, auto);
    gap: 1rem;
    max-height: 500px;
    overflow-x: auto;
    padding: 1rem 0;
}

.history-entry {
    padding: 1rem;
    background: #fff;
    border-radius: 6px;
    border-left: 4px solid;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin: 0.5rem 0;
}

.subtract-history .history-entry { border-color: #e53e3e; }
.add-history .history-entry { border-color: #48bb78; }

.summary-box {
    padding: 1.5rem;
    background: #f0fff4;
    border-radius: 8px;
    margin-top: 1.5rem;
    font-weight: 500;
    color: #2f855a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-hub-container {
        padding: 0.5rem;
    }
    
    .input-group {
        grid-template-columns: 1fr;
    }
    
    .history-container {
        grid-auto-flow: row;
        max-height: none;
        overflow-x: visible;
    }
}