/* Currency Converter Styles */
:root {
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #e9ecef;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 10px;
    --border-radius-lg: 12px;
}

.currency-converter-page {
    padding: 30px 0 60px;
    background: linear-gradient(135deg, #f5f9ff 0%, #e6f0ff 100%);
    min-height: 100vh;
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.tool-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback for browsers that don't support background-clip */
    display: inline-block;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 15px;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Converter Container */
.converter-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 40px;
}

.conversion-box {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.amount-input {
    margin-bottom: 25px;
    position: relative;
}

.amount-input input {
    width: 100%;
    padding: 20px 25px;
    font-size: 2.2rem;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    color: #2c3e50;
}

.amount-input input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

.amount-input input::placeholder {
    color: #bdc3c7;
    font-weight: 400;
}

.currency-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    position: relative;
}

.currency-selector::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #e9ecef;
    z-index: 1;
}

.from-currency, .to-currency {
    flex: 1;
    position: relative;
    z-index: 2;
    background: #fff;
    padding: 10px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.from-currency, .to-currency {
    flex: 1;
    position: relative;
}

.swap-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    color: #7f8c8d;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.swap-btn:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
    transform: rotate(180deg);
}

.conversion-result {
    text-align: center;
    margin: 30px 0;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-amount {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.last-updated {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 10px;
}

.last-updated i {
    margin-right: 5px;
}

.conversion-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 35px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
}

.btn i {
    font-size: 1rem;
}

.btn-primary {
    background: #3498db;
    color: white;
    border: 2px solid #3498db;
}

.btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(41, 128, 185, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid #e0e0e0;
    color: #7f8c8d;
}

.btn-outline:hover {
    background: #f8f9fa;
    border-color: #bdc3c7;
    color: #2c3e50;
}

.btn-text {
    background: none;
    border: none;
    color: #3498db;
    padding: 5px 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-text:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Rate Info */
.rate-info {
    padding: 20px 30px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.rate-display {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rate-change {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rate-change.down {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.rate-change i {
    font-size: 0.8rem;
}

/* Feature Tabs */
.feature-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn i {
    font-size: 1rem;
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-btn:hover:not(.active) {
    color: #2c3e50;
    background: #f8f9fa;
}

.tab-content {
    display: none;
    padding: 20px 0;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* Chart Styles */
.chart-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.chart-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #2c3e50;
}

.chart-period {
    display: flex;
    gap: 10px;
}

.period-btn {
    padding: 5px 15px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn:hover {
    background: #f8f9fa;
}

.period-btn.active {
    background: #3498db;
    border-color: #3498db;
    color: #fff;
}

.chart {
    height: 300px;
    width: 100%;
    position: relative;
}

.chart-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #bdc3c7;
    font-size: 1.2rem;
}

.chart-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state h4 {
    margin: 10px 0 5px;
    color: #7f8c8d;
    font-size: 1.2rem;
}

.empty-state p {
    margin: 0;
    font-size: 0.95rem;
}

/* Favorites & History Lists */
.favorites-list, .history-list {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(52, 152, 219, 0.2);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

/* Unique Features Section */
.unique-features {
    margin: 60px 0;
}

.unique-features h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #2c3e50;
    position: relative;
    padding-bottom: 15px;
}

.unique-features h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 3px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.feature {
    background: #fff;
    border-radius: 10px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.feature i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback for browsers that don't support background-clip */
}

.feature h3 {
    margin: 0 0 15px;
    font-size: 1.3rem;
    color: #2c3e50;
}

.feature p {
    margin: 0;
    color: #7f8c8d;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* SEO Content Styles */
.seo-content {
    margin: 60px 0;
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    line-height: 1.7;
    color: #444;
}

.seo-content h2 {
    color: #2c3e50;
    margin: 40px 0 20px;
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    border: 2px solid #e1e4f5;
    border-radius: var(--border-radius);
    background: var(--bg-white);
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    background-clip: padding-box;
    -webkit-background-clip: padding-box;
}

.input-group input:hover {
    border-color: #cbd5e0;
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2),
                inset 0 1px 2px rgba(0, 0, 0, 0.05);
    outline: none;
    transform: translateY(-1px);
}

.input-group input::placeholder {
    color: #a0aec0;
    opacity: 1;
    font-weight: 400;
}

/* Unit Display */
.input-group .unit-display {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #5d6d7e;
    font-weight: 500;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid #d6e0f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 2;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.input-group:focus-within .unit-display {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.98);
}

/* Input with icons */
.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.input-with-icon input {
    padding-left: 45px !important;
}

.input-with-icon:focus-within i {
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

/* Amount Input */
.amount-input {
    position: relative;
    margin-bottom: 25px;
}

.seo-content h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 3px;
}

.seo-content h3 {
    color: #34495e;
    margin: 30px 0 15px;
    font-size: 1.4rem;
}

.seo-content h4 {
    color: #2c3e50;
    margin: 25px 0 10px;
    font-size: 1.2rem;
}

.seo-content p {
    margin: 0 0 20px;
    line-height: 1.7;
}

.seo-content ul, .seo-content ol {
    margin: 15px 0 25px;
    padding-left: 25px;
}

.seo-content li {
    margin-bottom: 10px;
}

.steps {
    counter-reset: step;
    margin: 30px 0;
    padding: 0;
    list-style: none;
}

.steps li {
    position: relative;
    padding: 25px 0 25px 60px;
    border-left: 2px solid #e0e0e0;
    margin-left: 15px;
    counter-increment: step;
}

.steps li:before {
    content: counter(step);
    position: absolute;
    left: -15px;
    top: 25px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 0 0 4px white, 0 0 0 6px #3498db;
}

.steps li:last-child {
    border-left-color: transparent;
}

.feature-list {
    margin: 30px 0;
    padding: 0;
    list-style: none;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateX(5px);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.05);
}

.feature-item i {
    font-size: 1.5rem;
    color: #3498db;
    margin-right: 20px;
    margin-top: 5px;
    flex-shrink: 0;
}

.feature-item div h4 {
    margin: 0 0 10px;
    color: #2c3e50;
    font-size: 1.1rem;
}

.feature-item div p {
    margin: 0;
    color: #7f8c8d;
    line-height: 1.6;
}

.common-conversions {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin: 40px 0;
}

.conversion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.conversion-pair {
    background: white;
    padding: 15px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.conversion-pair:hover {
    transform: translateY(-2px);
}

.conversion-pair .rate {
    font-weight: 600;
    color: #2c3e50;
}

.faq {
    margin-bottom: 25px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.faq h3 {
    margin: 0;
    padding: 18px 25px;
    background: #f8f9fa;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq h3:after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.faq.active h3:after {
    transform: rotate(180deg);
}

.faq h3:hover {
    background: #f1f3f5;
}

.faq div {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq.active div {
    padding: 20px 25px;
    max-height: 1000px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .converter-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .conversion-box {
        padding: 20px;
    }
    
    .amount-input input {
        font-size: 1.8rem;
        padding: 15px 20px;
    }
    
    .currency-selector {
        flex-direction: column;
        gap: 15px;
    }
    
    .swap-btn {
        transform: rotate(90deg);
    }
    
    .swap-btn:hover {
        transform: rotate(270deg);
    }
    
    .rate-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .seo-content {
        padding: 25px 20px;
    }
    
    .seo-content h2 {
        font-size: 1.5rem;
    }
    
    .seo-content h3 {
        font-size: 1.3rem;
    }
    
    .feature-tabs {
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .tab-btn {
        white-space: nowrap;
        font-size: 0.9rem;
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .tool-header h1 {
        font-size: 1.8rem;
    }
    
    .conversion-actions {
        flex-wrap: wrap;
    }
    
    .btn {
        flex: 1 0 calc(50% - 10px);
    }
    
    .feature-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .feature-item i {
        margin-bottom: 10px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Select2 Customization */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 60px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
    padding: 0;
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 500;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 58px;
    width: 40px;
    right: 5px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #7f8c8d transparent transparent transparent;
    border-width: 8px 6px 0 6px;
    margin-left: -6px;
    margin-top: -4px;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #3498db transparent;
    border-width: 0 6px 8px 6px;
}

.select2-dropdown {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.select2-results__option {
    padding: 12px 15px;
    font-size: 0.95rem;
    color: #2c3e50;
    transition: all 0.2s ease;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: #3498db;
    color: white;
}

.select2-search--dropdown {
    padding: 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 12px;
    width: 100%;
    outline: none;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}
