/* ===============================================
   CURRENCY CONVERTER - USING MODERNTOOLS UNIFIED THEME WITH BLUE-GREEN ACCENT
   =============================================== */

/* Use modern tools color scheme with blue-green theme */
:root {
    --primary-color: #0066cc;
    --secondary-color: #00cec8;
    --accent-color: #0088ff;
    --text-color: #111827;
    --text-secondary: #4B5563;
    --text-tertiary: #6B7280;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-base: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;    
    --radius-2xl: 1.5rem;
    
    /* Gray color scale for consistency */
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    
    /* Currency specific colors */
    --trend-up-color: #10B981;
    --trend-down-color: #EF4444;
    --trend-neutral-color: #6B7280;
    --favorite-color: #F59E0B;
    
    /* Success and warning colors */
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    
    /* Aliases for compatibility */
    --brand-primary: var(--primary-color);
    --brand-secondary: var(--secondary-color);
    --text-primary: var(--text-color);
}

/* Dark theme */
[data-theme="dark"] {
    --text-color: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-tertiary: #9CA3AF;
    --bg-primary: #111827;
    --bg-secondary: #1F2937;
    --bg-tertiary: #374151;
    --border-color: #374151;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* ===============================================
   CALCULATOR MAIN LAYOUT
   =============================================== */

.calculator-main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.calculator-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ===============================================
   FAVORITES SECTION
   =============================================== */

.favorites-section {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.favorites-section h3 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.favorites-section h3 i {
    color: var(--favorite-color);
}

.favorite-pairs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.favorite-pair {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.favorite-pair:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.favorite-pair-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.favorite-pair-currencies {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
}

.favorite-pair-remove {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-base);
    transition: all 0.2s ease;
}

.favorite-pair-remove:hover {
    color: var(--danger-color);
    background: var(--bg-tertiary);
}

.favorite-pair-rate {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===============================================
   CALCULATOR CARD
   =============================================== */

.calculator-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

/* ===============================================
   CURRENCY INPUT SECTION
   =============================================== */

.currency-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.currency-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.currency-input-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.amount-input-container {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.amount-input-container input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    background: var(--bg-primary);
    color: var(--text-color);
    transition: all 0.2s ease;
}

.amount-input-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.amount-input-container input:read-only {
    background: var(--bg-secondary);
    cursor: not-allowed;
}

.currency-selector {
    position: relative;
}

/* ===============================================
   ENHANCED CURRENCY DISPLAY
   =============================================== */

.currency-selector {
    position: relative;
}

.currency-select {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.currency-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.currency-select:hover {
    border-color: var(--primary-color);
}

.currency-info {
    margin-top: 0.5rem;
}

.currency-name {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-style: italic;
}

/* ===============================================
   SWAP CONTROLS
   =============================================== */

.swap-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.swap-button, .favorite-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.swap-button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: rotate(180deg);
}

.favorite-button:hover {
    background: var(--favorite-color);
    color: white;
    border-color: var(--favorite-color);
}

.favorite-button.active {
    background: var(--favorite-color);
    color: white;
    border-color: var(--favorite-color);
}

.favorite-button.active i {
    transform: scale(1.1);
}

/* ===============================================
   ENHANCED EXCHANGE RATE DISPLAY
   =============================================== */

.exchange-rate-display {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.rate-primary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.rate-visual {
    margin-bottom: 1rem;
}

.rate-indicator {
    margin-top: 0.5rem;
}

.indicator-bar {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.indicator-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--trend-down-color), var(--trend-neutral-color), var(--trend-up-color));
    border-radius: 3px;
    width: 60%;
    transition: width 0.3s ease;
}

.indicator-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.rate-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.rate-source {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rate-source i {
    color: var(--success-color);
}

/* ===============================================
   CURRENCY CHART SECTION
   =============================================== */

.currency-chart-section {
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(59, 130, 246, 0.02) 100%);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.currency-chart-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.currency-chart-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.chart-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chart-header h3 i {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: var(--radius-xl);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.chart-period {
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    min-width: 70px;
    text-align: center;
}

.chart-period::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.chart-period:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.chart-period:hover::before {
    opacity: 0.1;
}

.chart-period.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.chart-period.active::before {
    opacity: 1;
}

.chart-container {
    width: 100%;
    height: 280px;
    margin-bottom: 1.5rem;
    position: relative;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(255, 255, 255, 0.5) 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    overflow: hidden;
    z-index: 1;
}

.chart-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, 
        transparent 0%, 
        rgba(59, 130, 246, 0.02) 25%,
        rgba(16, 185, 129, 0.02) 50%,
        rgba(59, 130, 246, 0.02) 75%,
        transparent 100%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.chart-container canvas {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius-lg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-tertiary);
    font-size: 1.1rem;
    font-weight: 500;
}

.chart-placeholder i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.7;
}

.chart-placeholder i.fa-spinner {
    color: var(--primary-color);
}

.chart-placeholder span {
    font-weight: 600;
    margin-top: 0.5rem;
}

.chart-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
}

.stat-item {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(255, 255, 255, 0.3) 100%);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item:nth-child(1):hover::before {
    background: var(--trend-up-color);
}

.stat-item:nth-child(2):hover::before {
    background: var(--trend-down-color);
}

.stat-item:nth-child(3):hover::before {
    background: var(--primary-color);
}

.stat-item:nth-child(4):hover::before {
    background: var(--secondary-color);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.stat-value.positive {
    color: var(--trend-up-color);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.stat-value.negative {
    color: var(--trend-down-color);
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.stat-item:hover .stat-value {
    transform: scale(1.05);
}

/* ===============================================
   CURRENCY INFO DISPLAY
   =============================================== */

.currency-info {
    margin-top: 0.5rem;
    padding: 0.25rem 0;
}

.currency-name {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ===============================================
   RESPONSIVE CHART DESIGN
   =============================================== */

@media (max-width: 768px) {
    .chart-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .chart-controls {
        width: 100%;
        justify-content: center;
    }
    
    .chart-period {
        flex: 1;
        text-align: center;
    }
    
    .chart-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rate-primary {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .rate-details {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .chart-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .currency-chart-section {
        padding: 1rem;
    }
    
    .chart-container {
        height: 150px;
    }
}

/* ===============================================
   ENHANCED INFO PANEL
   =============================================== */

.info-panel {
    margin-top: 2rem;
}

.info-card {
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(59, 130, 246, 0.02) 100%);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.info-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color), var(--primary-color));
    border-radius: var(--radius-xl);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-size: 400% 400%;
    animation: gradientShift 8s ease-in-out infinite;
}

.info-card:hover::after {
    opacity: 0.1;
}

.info-card h3 {
    margin: 0 0 2rem 0;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    justify-content: center;
}

.info-card h3 i {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-item {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

.info-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.info-item:hover .info-item-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.3);
}

.info-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-item:hover::before {
    opacity: 1;
}

.info-item strong {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.info-item strong::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    flex-shrink: 0;
}

.info-item:nth-child(1) strong::before {
    background: var(--trend-up-color);
}

.info-item:nth-child(2) strong::before {
    background: var(--primary-color);
}

.info-item:nth-child(3) strong::before {
    background: var(--secondary-color);
}

.info-item:nth-child(4) strong::before {
    background: var(--favorite-color);
}

.info-item p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Info item icons */
.info-item-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-item:nth-child(1) .info-item-icon {
    background: linear-gradient(135deg, var(--trend-up-color), #34D399);
}

.info-item:nth-child(2) .info-item-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.info-item:nth-child(3) .info-item-icon {
    background: linear-gradient(135deg, var(--secondary-color), #22D3EE);
}

.info-item:nth-child(4) .info-item-icon {
    background: linear-gradient(135deg, var(--favorite-color), #FBBF24);
}

/* Animated gradient border effect */

/* Dark mode enhancements for info panel */
[data-theme="dark"] .info-card {
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(59, 130, 246, 0.05) 100%);
}

[data-theme="dark"] .info-item {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(255, 255, 255, 0.02) 100%);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .info-item-icon {
        transition: none;
    }
    
    .info-card::after {
        animation: none;
    }
    
    .info-item:hover .info-item-icon {
        transform: none;
    }
}

/* Print styles for info panel */
@media print {
    .info-card::before,
    .info-card::after {
        display: none;
    }
    
    .info-item-icon {
        background: #333 !important;
        color: white !important;
    }
    
    .info-item {
        background: #f9f9f9 !important;
        border: 1px solid #ddd !important;
    }
}

/* ===============================================
   HERO SECTION STYLING
   =============================================== */

.tool-hero {
    margin-top: 0;
    padding: 120px 0 80px;
    position: relative;
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(59, 130, 246, 0.1) 30%, rgba(16, 185, 129, 0.1) 70%, var(--bg-primary) 100%);
}

.tool-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-tertiary);
    opacity: 0.3;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.hero-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.hero-icon i {
    font-size: 2.5rem;
    color: white;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    display: block;
}

/* Force paragraph wrapping on desktop and larger screens */
@media (min-width: 768px) {
    .hero-description {
        max-width: 500px;
        white-space: normal;
        word-break: normal;
        hyphens: auto;
    }
}

@media (min-width: 1024px) {
    .hero-description {
        max-width: 550px;
        font-size: 1.3rem;
        line-height: 1.7;
    }
}

.hero-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.hero-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.hero-features li i {
    color: var(--success-color);
    font-size: 1.1rem;
}

/* ===============================================
   FOOTER STYLING
   =============================================== */

.footer {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.footer-logo i {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    max-width: 400px;
}

.footer-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.footer-copyright p {
    margin: 0;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.footer-legal a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: var(--primary-color);
}

.footer-legal .separator {
    color: var(--border-color);
}

/* Footer responsive design */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-sections {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .footer-sections {
        grid-template-columns: 1fr;
    }
    
    .hero-icon {
        width: 60px;
        height: 60px;
    }
    
    .hero-icon i {
        font-size: 2rem;
    }
}

/* ===============================================
   COMPREHENSIVE RESPONSIVE DESIGN
   =============================================== */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .calculator-container {
        max-width: 900px;
    }
    
    .calculator-actions {
        gap: 1.5rem;
    }
    
    .btn-primary, .btn-secondary {
        min-width: 160px;
        padding: 1.125rem 2.5rem;
        font-size: 1.1rem;
    }
}

/* Desktop (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .calculator-container {
        max-width: 800px;
    }
}

/* Laptop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .calculator-container {
        max-width: 750px;
    }
    
    .calculator-card {
        padding: 1.75rem;
    }
}

/* Tablet Landscape (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .calculator-container {
        max-width: 700px;
        padding: 0 1rem;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
    
    .amount-input-container {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .currency-select {
        min-width: 150px;
    }
    
    .calculator-actions {
        gap: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        min-width: 130px;
        padding: 0.875rem 1.75rem;
    }
}

/* Tablet Portrait & Mobile Landscape (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .calculator-main {
        padding: 1.5rem 0;
    }
    
    .calculator-container {
        padding: 0 1rem;
    }
    
    .calculator-card {
        padding: 1.5rem;
        margin: 0;
    }
    
    .amount-input-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .currency-select {
        width: 100%;
        min-width: unset;
    }
    
    .calculator-actions {
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
    }
    
    .btn-primary, .btn-secondary {
        flex: 1;
        max-width: 160px;
        min-width: 120px;
    }
    
    .rate-primary {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .rate-details {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .chart-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .chart-controls {
        width: 100%;
        justify-content: center;
    }
    
    .chart-period {
        flex: 1;
        text-align: center;
        min-width: 60px;
    }
    
    .chart-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .favorite-pairs {
        grid-template-columns: 1fr;
    }
}

/* Mobile Portrait (up to 575px) */
@media (max-width: 575px) {
    .calculator-main {
        padding: 1rem 0;
    }
    
    .calculator-container {
        padding: 0 0.5rem;
        gap: 1.5rem;
    }
    
    .calculator-card {
        padding: 1.25rem;
        margin: 0;
    }
    
    .currency-section {
        gap: 1.25rem;
    }
    
    .amount-input-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .currency-select {
        width: 100%;
        min-width: unset;
        padding: 0.875rem 0.75rem;
        font-size: 0.95rem;
    }
    
    .swap-container {
        margin: 1rem 0;
        gap: 0.75rem;
    }
    
    .swap-button, .favorite-button {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    .calculator-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        min-width: unset;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .exchange-rate-display {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .rate-text {
        font-size: 1.05rem;
    }
    
    .rate-primary {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .rate-details {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
        font-size: 0.8rem;
    }
    
    .currency-chart-section {
        padding: 1.25rem;
        margin: 0 0 1.5rem 0;
    }
    
    .chart-container {
        height: 160px;
    }
    
    .chart-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .chart-controls {
        width: 100%;
        gap: 0.25rem;
    }
    
    .chart-period {
        flex: 1;
        padding: 0.5rem 0.5rem;
        font-size: 0.85rem;
        text-align: center;
    }
    
    .chart-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 0.75rem;
        background: var(--bg-secondary);
        border-radius: var(--radius-base);
    }
    
    .info-panel {
        margin: 0.5rem;
    }
    
    .info-card {
        padding: 1.25rem;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Extra Small Mobile (up to 360px) */
@media (max-width: 360px) {
    .calculator-container {
        padding: 0 0.25rem;
    }
    
    .calculator-card {
        padding: 1rem;
    }
    
    .currency-select {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .swap-button, .favorite-button {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .exchange-rate-display {
        padding: 1rem;
    }
    
    .currency-chart-section {
        padding: 1rem;
    }
    
    .chart-container {
        height: 140px;
    }
    
    .chart-period {
        padding: 0.4rem 0.3rem;
        font-size: 0.8rem;
    }
    
    .tool-hero {
        padding: 60px 0 40px;
    }
    
    .hero-icon {
        width: 50px;
        height: 50px;
    }
    
    .hero-icon i {
        font-size: 1.75rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .currency-select {
        background-size: 1.2em 1.2em;
    }
}

/* Landscape Orientation for Mobile */
@media (orientation: landscape) and (max-height: 600px) {
    .tool-hero {
        padding: 40px 0 30px;
    }
    
    .calculator-main {
        padding: 1rem 0;
    }
    
    .currency-chart-section {
        margin-bottom: 1rem;
    }
    
    .chart-container {
        height: 120px;
    }
}

/* Print Styles */
@media print {
    .calculator-actions,
    .chart-controls,
    .swap-button,
    .favorite-button {
        display: none;
    }
    
    .calculator-card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .exchange-rate-display {
        background: #f5f5f5;
    }
}

/* ===============================================
   ACTION BUTTONS
   =============================================== */

.calculator-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    justify-content: center;
    border: 2px solid transparent;
    text-decoration: none;
    outline: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
    color: var(--text-color);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* ===============================================
   ACCESSIBILITY ENHANCEMENTS
   =============================================== */

/* Focus styles for keyboard navigation */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
    
    [data-theme="dark"] {
        --border-color: #FFFFFF;
        --text-secondary: #FFFFFF;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .swap-button:hover {
        transform: none;
    }
}

/* ===============================================
   LOADING STATES
   =============================================== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading .btn-primary {
    background: var(--gray-400);
    border-color: var(--gray-400);
}

/* Loading spinner for chart */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chart-placeholder i.fa-spinner {
    color: var(--primary-color);
}

.chart-placeholder span {
    font-weight: 600;
    margin-top: 0.5rem;
}

/* ===============================================
   MOBILE-FIRST OPTIMIZATIONS
   =============================================== */

/* Touch interactions */
@media (hover: none) and (pointer: coarse) {
    .btn-primary, .btn-secondary {
        min-height: 48px;
        padding: 0.875rem 1.5rem;
    }
    
    .swap-button, .favorite-button {
        min-width: 48px;
        min-height: 48px;
    }
    
    .chart-period {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
    
    .currency-select {
        min-height: 48px;
        padding: 0.75rem 1rem;
    }
}

/* Hover-capable devices */
@media (hover: hover) and (pointer: fine) {
    .calculator-actions {
        gap: 1.25rem;
    }
    
    .btn-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0, 102, 204, 0.25);
    }
    
    .btn-secondary:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .btn-primary:hover,
    .btn-secondary:hover,
    .swap-button:hover {
        transform: none;
    }
    
    .calculator-actions {
        transition: none;
    }
}

/* Dark mode specific adjustments */
@media (prefers-color-scheme: dark) {
    .btn-primary {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .btn-primary:hover {
        box-shadow: 0 4px 16px rgba(0, 102, 204, 0.4);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        border-width: 3px;
        font-weight: 700;
    }
    
    .btn-secondary {
        border-width: 3px;
        font-weight: 700;
    }
}

/* ===============================================
   MODERN CHART ANIMATIONS & EFFECTS
   =============================================== */

@keyframes chartFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.currency-chart-section {
    animation: chartFadeIn 0.6s ease-out;
}

.chart-loading {
    position: relative;
}

.chart-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    border-radius: var(--radius-xl);
}

@keyframes loading-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Enhanced dark mode for chart */
[data-theme="dark"] .currency-chart-section {
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .chart-container {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .chart-controls {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
}

[data-theme="dark"] .stat-item {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .currency-chart-section,
    .stat-item,
    .chart-period {
        animation: none;
        transition: none;
    }
    
    .chart-container::before {
        animation: none;
    }
    
    .stat-item:hover,
    .chart-period:hover {
        transform: none;
    }
}

/* Print styles for chart */
@media print {
    .currency-chart-section::before,
    .currency-chart-section::after,
    .chart-container::before {
        display: none;
    }
    
    .chart-controls {
        background: none;
        box-shadow: none;
    }
    
    .stat-item {
        background: #f9f9f9 !important;
        border: 1px solid #ddd !important;
    }
}
