/* Currency Converter Styles */

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.hero-icon {
    font-size: 3rem;
    color: inherit;
    display: inline-block;
    margin-right: 0.5rem;
}

.hero-description {
    font-size: 1.2rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.tool-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.panel-header {
    background: #f8f9fa;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
}

.form-section {
    padding: 1.5rem;
}

.conversion-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.amount-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.amount-group label {
    font-weight: 600;
    color: #333;
}

.amount-group input {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
}

.amount-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.currency-selector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.currency-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.currency-group label {
    font-weight: 600;
    color: #333;
}

.currency-select-wrapper select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.currency-select-wrapper select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.convert-btn {
    margin-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.period-select {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

.result-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.conversion-result {
    text-align: center;
    margin-bottom: 1rem;
}

.result-amount {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.exchange-rate {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

.rate-change {
    font-size: 0.9rem;
    color: #28a745;
}

.rate-change.negative {
    color: #dc3545;
}

.result-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.chart-section {
    padding: 1.5rem;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 1rem;
}

.chart-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.chart-stats {
    display: flex;
    justify-content: space-around;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.popular-rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.rate-card {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.rate-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.rate-pair {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.rate-value {
    font-size: 1.2rem;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.rate-change-percent {
    font-size: 0.9rem;
    font-weight: 500;
}

.rate-change-percent.positive {
    color: #28a745;
}

.rate-change-percent.negative {
    color: #dc3545;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.history-item:hover {
    background-color: #f8f9fa;
}

.history-item:last-child {
    border-bottom: none;
}

.history-conversion {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-amount {
    font-weight: 600;
    color: #333;
}

.history-rate {
    font-size: 0.9rem;
    color: #6c757d;
}

.history-date {
    font-size: 0.8rem;
    color: #6c757d;
}

.no-history {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
    font-style: italic;
}

.info-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
}

.info-section h2 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    text-align: center;
}

.info-card h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.info-card p {
    color: #495057;
    line-height: 1.6;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: #28a745;
}

.toast-error {
    background: #dc3545;
}

.toast-warning {
    background: #ffc107;
    color: #333;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-icon {
        font-size: 2rem;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    .panel-header {
        flex-direction: column;
        gap: 1rem;
    }

    .panel-actions {
        width: 100%;
        justify-content: space-between;
    }

    .currency-selector-grid {
        grid-template-columns: 1fr;
    }

    .chart-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .popular-rates-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
