/* Calculator Specific Styles */
.calculator-advanced {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.summary-card {
    background: #f8f9ff;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #667eea;
}

.summary-card h3 {
    margin: 0 0 1rem 0;
    color: #555;
    font-size: 0.9rem;
}

.summary-card .amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.table-container {
    overflow-x: auto;
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Scientific Calculator Styles */
.scientific-calculator {
    background: #2c3e50;
    border-radius: 10px;
    padding: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.calculator-display input {
    width: 100%;
    padding: 1rem;
    font-size: 1.5rem;
    text-align: right;
    border: none;
    background: #34495e;
    color: white;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.calculator-buttons {
    display: grid;
    gap: 0.5rem;
}

.button-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.btn-calc {
    padding: 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-calc.num {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-calc.func {
    background: #e74c3c;
    color: white;
}

.btn-calc.sci {
    background: #3498db;
    color: white;
}

.btn-calc.equal {
    background: #2ecc71;
    color: white;
    grid-column: span 1;
}

.btn-calc.zero {
    grid-column: span 2;
}

.btn-calc:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.calculator-history {
    margin-top: 2rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
}

.history-item {
    padding: 0.5rem;
    border-bottom: 1px solid #e1e5e9;
    font-family: monospace;
}

/* Tab Styles */
.calculator-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e1e5e9;
}

.tab-btn {
    padding: 1rem 2rem;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    border-bottom-color: #667eea;
    color: #667eea;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* BMI Chart */
.bmi-chart {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.bmi-table {
    width: 100%;
    border-collapse: collapse;
}

.bmi-table th, .bmi-table td {
    padding: 1rem;
    text-align: center;
    border: 1px solid #e1e5e9;
}

.bmi-table tr:nth-child(even) {
    background: #f8f9fa;
}

/* Chart Container */
.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.language-selector select {
    padding: 0.5rem;
    border: 1px solid #e1e5e9;
    border-radius: 5px;
    background: white;
}

/* Search Box */
.search-box {
    display: flex;
    max-width: 500px;
    margin: 2rem auto;
}

.search-box input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-box button {
    padding: 1rem 2rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

/* Popular Calculators Grid */
.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.popular-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.popular-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.popular-card h3 {
    margin: 0 0 0.5rem 0;
    color: #667eea;
}

.popular-card p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Ad Banner */
.ad-banner {
    margin: 2rem 0;
    text-align: center;
}