/* Gold Calculator Pro - Frontend Styles */

/* CSS Variables for theming */
:root {
    --primary-gold: #FFD700;
    --secondary-gold: #FFA500;
    --dark-gold: #B8860B;
    --light-gold: #FFF8DC;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #2c3e50;
    --border-color: #e9ecef;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Dark theme variables */
[data-theme="dark"] {
    --text-dark: #ffffff;
    --text-light: #b0b0b0;
    --bg-white: #1a1a1a;
    --bg-light: #2d2d2d;
    --bg-dark: #000000;
    --border-color: #404040;
}

/* Main Container */
.gold-calculator-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}


/* Language Switcher */
.language-switcher {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.language-switcher select {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.language-switcher select:hover {
    border-color: var(--primary-gold);
}

/* Metal Type Selector */
.metal-type-selector {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.metal-switch-container {
    position: relative;
    background: var(--bg-light);
    border-radius: 25px;
    padding: 4px;
    display: flex;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.metal-switch-container:hover {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 6px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.metal-switch-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-gold) 100%);
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.metal-switch-container.silver .metal-switch-slider {
    transform: translateX(100%);
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
}

.metal-tab {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 20px;
    min-width: 120px;
}

.metal-tab:hover {
    color: var(--text-dark);
}

.metal-tab.active {
    color: var(--text-dark);
    font-weight: 600;
}

.metal-icon {
    font-size: 18px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.metal-tab:hover .metal-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.metal-tab.active .metal-icon {
    transform: scale(1.05);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.metal-name {
    font-size: 14px;
    font-weight: 600;
}

/* Dynamic Header Colors */
#gold-calculator-pro .metal-price-section.gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    transition: all 0.5s ease;
}

#gold-calculator-pro .metal-price-section.silver {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%) !important;
    transition: all 0.5s ease;
}

/* Dynamic Calculator Section Colors */
#gold-calculator-pro .calculator-section.gold {
    background: var(--bg-white);
    transition: all 0.5s ease;
}

#gold-calculator-pro .calculator-section.silver {
    background: var(--bg-white);
    transition: all 0.5s ease;
}

/* Dynamic Chart Section Colors */
#gold-calculator-pro .chart-section.gold {
    background: var(--bg-white);
    transition: all 0.5s ease;
}

#gold-calculator-pro .chart-section.silver {
    background: var(--bg-white);
    transition: all 0.5s ease;
}

/* Dynamic Table Section Colors */
#gold-calculator-pro .live-price-tables-section.gold {
    background: var(--bg-white);
    transition: all 0.5s ease;
}

#gold-calculator-pro .live-price-tables-section.silver {
    background: var(--bg-white);
    transition: all 0.5s ease;
}

/* Metal-specific styling */
.metal-price-section.gold .live-indicator .live-dot {
    background: #FF6B35;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.metal-price-section.silver .live-indicator .live-dot {
    background: #708090;
    box-shadow: 0 0 10px rgba(112, 128, 144, 0.5);
}

/* Metal Price Section */
.metal-price-section {
    color: var(--text-dark);
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.metal-price-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.price-header {
    position: relative;
    z-index: 2;
}

#gold-calculator-pro .price-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: white !important;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse 2s infinite;
}

.live-dot {
    width: 12px;
    height: 12px;
    background: #ff0000;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#gold-calculator-pro .last-updated {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 20px;
    color: white !important;
}

.location-selector {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.form-control {
    padding: 8px 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    font-size: 14px;
    transition: var(--transition);
    min-width: 150px;
}

.form-control:focus {
    outline: none;
    border-color: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.price-display {
    display: flex;
    justify-content: center;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.price-item {
    text-align: center;
}

.price-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    opacity: 0.9;
}

.price-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Calculator Section */
.calculator-section {
    padding: 30px;
    background: var(--bg-white);
}

.calculator-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: var(--text-dark);
    text-align: center;
}

.tables-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: var(--text-dark);
    text-align: center;
}

.chart-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: var(--text-dark);
    text-align: center;
}

.results-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: var(--text-dark);
    text-align: center;
}

.recent-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--text-dark);
    text-align: center;
}

.calculator-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-control {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 14px;
    transition: var(--transition);
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.weight-input-group,
.making-charges-group,
.tax-input-group {
    display: flex;
    gap: 10px;
}

.weight-input-group .form-control:first-child,
.making-charges-group .form-control:first-child {
    flex: 1;
}

.input-suffix {
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-left: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    color: var(--text-light);
    font-weight: 600;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-gold) 100%);
    color: var(--text-dark);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-gold);
    border: 2px solid var(--primary-gold);
}

.btn-outline:hover {
    background: var(--primary-gold);
    color: var(--text-dark);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Results Section */
.results-section {
    padding: 30px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.results-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: var(--text-dark);
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.result-item.total-item {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-gold) 100%);
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.1rem;
}

.result-label {
    font-weight: 600;
    color: var(--text-dark);
}

.result-value {
    font-weight: 700;
    color: var(--primary-gold);
    font-size: 1.1rem;
}

.total-item .result-value {
    color: var(--text-dark);
    font-size: 1.3rem;
}

.results-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Recent Calculations */
.recent-calculations-section {
    padding: 30px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.recent-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--text-dark);
}

.recent-calculations-list {
    margin-bottom: 20px;
}

.recent-calculation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    transition: var(--transition);
}

.recent-calculation-item:hover {
    background: var(--border-color);
}

.recent-calculation-info {
    flex: 1;
}

.recent-calculation-actions {
    display: flex;
    gap: 10px;
}

.no-recent {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 20px;
}

/* Chart Section */
.chart-section {
    padding: 30px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.chart-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
}

.chart-controls {
    display: flex;
    gap: 5px;
}

.chart-period-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-dark);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.chart-period-btn:hover,
.chart-period-btn.active {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    color: var(--text-dark);
}

.chart-container {
    position: relative;
    height: 400px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.error-messages,
.success-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.error-message,
.success-message {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 10px;
    animation: slideIn 0.3s ease;
}

.error-message {
    background: var(--error-color);
    color: white;
}

.success-message {
    background: var(--success-color);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.error-icon,
.success-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Responsive Design - Mobile First Approach like goldcalculate.in */
@media (max-width: 768px) {
    /* Reset body for mobile */
    body {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        background: #f8f9fa;
    }
    
    /* Main container - full width like reference site */
    .gold-calculator-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        position: relative;
        left: 0;
        transform: none;
        display: block;
    }
    
    /* Remove all card-like styling */
    .gold-calculator-container > * {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }
    
    /* Metal type selector - centered like reference */
    .metal-type-selector {
        padding: 20px 15px;
        background: white;
        margin-bottom: 0;
    }
    
    .metal-switch-container {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .metal-tab {
        padding: 12px 24px;
        font-size: 14px;
        min-width: 120px;
    }
    
    .metal-icon {
        font-size: 18px;
    }
    
    .metal-name {
        font-size: 14px;
    }
    
    /* Price section - clean like reference */
    .metal-price-section {
        padding: 20px 15px;
        margin: 0;
        background: white;
    }
    
    .price-title {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .location-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin: 20px 0;
    }
    
    .location-selector .form-group {
        width: 100%;
    }
    
    .location-selector .form-control {
        width: 100%;
        min-width: auto;
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .price-display {
        flex-direction: column;
        gap: 20px;
        margin: 20px 0;
    }
    
    /* Calculator section - clean layout */
    .calculator-section {
        padding: 20px 15px;
        background: white;
        margin: 0;
    }
    
    .calculator-form {
        max-width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-control {
        padding: 12px 15px;
        font-size: 16px;
        width: 100%;
    }
    
    /* Results section */
    .results-section {
        padding: 20px 15px;
        background: white;
        margin: 0;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .results-actions {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
    }
    
    .export-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    /* Chart section */
    .chart-section {
        padding: 20px 15px;
        background: white;
        margin: 0;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .chart-controls {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .chart-container {
        height: 300px;
        padding: 0;
        width: 100%;
        margin: 0;
    }
    
    /* Live price tables - clean like reference */
    .live-price-tables-section {
        padding: 20px 15px;
        background: white;
        margin: 0;
    }
    
    .live-price-table-section {
        padding: 0;
        background: transparent;
        border: none;
        margin-bottom: 30px;
    }
    
    .price-table-wrapper {
        margin-bottom: 0;
        padding: 0;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }
    
    .table-subtitle {
        font-size: 1.2rem;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .price-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        margin: 0;
        padding: 0;
        background: white;
    }
    
    .live-price-table {
        width: 100%;
        min-width: auto;
        margin: 0;
    }
    
    .live-price-table th,
    .live-price-table td {
        padding: 12px 8px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    /* Recent calculations */
    .recent-calculations-section {
        padding: 20px 15px;
        background: white;
        margin: 0;
    }
    
    /* Language switcher */
    .language-switcher {
        position: static;
        text-align: center;
        margin-bottom: 20px;
        padding: 15px;
        background: white;
    }
    
    /* Form controls mobile */
    .weight-input-group,
    .making-charges-group,
    .tax-input-group {
        flex-direction: column;
        gap: 5px;
    }
    
    .weight-input-group .form-control:first-child,
    .making-charges-group .form-control:first-child {
        flex: none;
    }
    
    .input-suffix {
        border-radius: var(--border-radius);
        border-left: 2px solid var(--border-color);
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        margin: 0;
        padding: 5px;
        box-sizing: border-box;
    }
    
    .gold-calculator-container {
        width: 95% !important;
        max-width: 95% !important;
        margin: 0 auto !important;
        position: relative;
        left: 0;
        transform: none;
        display: block;
    }
    
    .price-title {
        font-size: 1.3rem;
    }
    
    .price-value {
        font-size: 1.2rem;
    }
    
    .calculator-title {
        font-size: 1.3rem;
    }
    
    .chart-container {
        height: 250px;
        padding: 5px;
        width: 100%;
        margin: 0;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 14px;
        width: 100%;
    }
    
    .chart-period-btn {
        padding: 6px 12px;
        font-size: 12px;
        flex: 1;
        min-width: 0;
    }
    
    .live-price-table th,
    .live-price-table td {
        padding: 6px 3px;
        font-size: 11px;
    }
    
    .result-item {
        padding: 10px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .result-label {
        font-size: 0.9rem;
    }
    
    .result-value {
        font-size: 1rem;
    }
    
    .recent-calculation-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .recent-calculation-actions {
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    /* Same clean layout as 768px but with smaller padding */
    body {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        background: #f8f9fa;
    }
    
    .gold-calculator-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
    }
    
    /* Reduce padding for smaller screens */
    .metal-type-selector,
    .metal-price-section,
    .calculator-section,
    .results-section,
    .chart-section,
    .live-price-tables-section,
    .recent-calculations-section {
        padding: 15px 10px;
    }
    
    .language-switcher {
        padding: 10px;
    }
    
    .metal-type-selector {
        padding: 10px;
    }
    
    .metal-switch-container {
        width: 100%;
        max-width: 250px;
    }
    
    .metal-tab {
        padding: 8px 16px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .metal-icon {
        font-size: 14px;
    }
    
    .metal-name {
        font-size: 12px;
    }
    
    .metal-price-section {
        padding: 10px;
    }
    
    .price-title {
        font-size: 1.5rem;
    }
    
    .chart-container {
        height: 250px;
        padding: 5px;
        width: 100%;
        margin: 0;
    }
    
    .price-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        padding: 0;
    }
    
    .live-price-table th,
    .live-price-table td {
        padding: 6px 3px;
        font-size: 11px;
    }
    
    .price-table-wrapper {
        padding: 0;
        margin-bottom: 15px;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }
    
    .table-subtitle {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .result-item {
        padding: 8px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .result-label {
        font-size: 0.8rem;
    }
    
    .result-value {
        font-size: 0.9rem;
    }
    
    .recent-calculation-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .recent-calculation-actions {
        justify-content: space-between;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Live Price Tables */
.live-price-tables-section {
    padding: 30px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.price-table-wrapper {
    margin-bottom: 40px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.table-subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

/* Live Price Table */
.live-price-table-section {
    padding: 30px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.table-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--text-dark);
    text-align: center;
}

.table-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.table-controls .form-control {
    max-width: 200px;
}

    .price-table-container {
        overflow-x: auto;
        border-radius: 0;
        box-shadow: none;
        width: 100%;
        margin: 0;
        padding: 0;
    }

.live-price-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    font-size: 14px;
}

.live-price-table th {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-gold) 100%);
    color: var(--text-dark);
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.live-price-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}

.live-price-table tbody tr:hover {
    background: var(--bg-light);
}

.live-price-table tbody tr:nth-child(even) {
    background: rgba(255, 215, 0, 0.05);
}

.loading-row {
    text-align: center;
    padding: 30px !important;
    color: var(--text-light);
}

.loading-row .loading-spinner {
    margin: 0 auto 10px;
}

.price-cell {
    font-weight: 600;
    color: var(--primary-gold);
}

.currency-cell {
    font-weight: 600;
    color: var(--text-dark);
}

.time-cell {
    font-size: 12px;
    color: var(--text-light);
}

.positive-change {
    color: var(--success-color);
    font-weight: 600;
}

.negative-change {
    color: var(--error-color);
    font-weight: 600;
}

/* Save button and action buttons styling */
#save-calculation {
    font-size: 0.85rem;
    padding: 8px 16px;
    display: inline-block;
    background: var(--primary-gold);
    color: var(--text-dark);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-right: 10px;
}

#save-calculation:hover {
    background: var(--secondary-gold);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-gold);
    color: var(--primary-gold);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline:hover {
    background: var(--primary-gold);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Recent calculations styling */
.recent-calculation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.recent-calculation-item:hover {
    background: var(--bg-white);
    box-shadow: var(--shadow);
}

.recent-calculation-info {
    flex: 1;
}

.recent-calculation-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-total {
    font-weight: 600;
    color: var(--primary-gold);
    font-size: 1.1rem;
}

/* Print styles */
@media print {
    .language-switcher,
    .chart-controls,
    .results-actions,
    .recent-calculations-section,
    .live-price-table-section {
        display: none;
    }
    
    .gold-calculator-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .metal-price-section {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
}
