/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Main Content */
.main {
    flex: 1;
    padding: 2rem 0;
}

/* Converter Section */
.converter-section {
    margin-bottom: 3rem;
}

.converter-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 2rem;
}

.amount-input {
    margin-bottom: 1.5rem;
}

.amount-input label,
.currency-select label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.amount-input input {
    width: 100%;
    padding: 1rem;
    font-size: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 600;
}

.amount-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.currency-select-group {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.currency-select {
    flex: 1;
}

.currency-select select {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.currency-select select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.swap-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    margin-bottom: 0.5rem;
}

.swap-btn:hover {
    background: var(--primary-hover);
    transform: rotate(180deg);
}

.swap-btn:active {
    transform: rotate(180deg) scale(0.95);
}

/* Result Section */
.result-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.result-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.result-currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.exchange-rate {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.last-updated {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.convert-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

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

.convert-btn:active {
    transform: translateY(0);
}

/* AI Features Section */
.ai-features-section {
    margin-bottom: 3rem;
}

.ai-features-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--text-primary);
}

.feature-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.feature-card h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.trend-chart {
    margin-bottom: 1.5rem;
    height: 200px;
    position: relative;
}

.trend-chart canvas {
    width: 100%;
    height: 100%;
}

.trend-prediction {
    padding: 1rem;
    background: #f0f9ff;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.recommendations {
    padding: 1rem;
    background: #fef3c7;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--warning-color);
}

.recommendations ul {
    list-style: none;
    padding-left: 0;
}

.recommendations li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.recommendations li:last-child {
    border-bottom: none;
}

/* Popular Conversions */
.popular-conversions {
    margin-bottom: 3rem;
}

.popular-conversions h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--text-primary);
}

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

.conversion-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.conversion-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--primary-color);
}

.conversion-item .pair {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.conversion-item .rate {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* Info Section */
.info-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.info-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 2rem;
}

.info-section h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.info-content ul,
.info-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.info-content li {
    margin-bottom: 0.5rem;
}

.currency-codes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.code-item {
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

.footer a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: var(--transition);
}

.footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .converter-card {
        padding: 1.5rem;
    }
    
    .currency-select-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .swap-btn {
        align-self: center;
        transform: rotate(90deg);
    }
    
    .swap-btn:hover {
        transform: rotate(270deg);
    }
    
    .result-amount {
        font-size: 2rem;
    }
    
    .result-currency {
        font-size: 1.2rem;
    }
    
    .conversion-grid {
        grid-template-columns: 1fr;
    }
    
    .currency-codes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .converter-card {
        padding: 1rem;
    }
    
    .result-amount {
        font-size: 1.5rem;
    }
}

/* Feedback Section */
.feedback-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.feedback-title {
    text-align: center;
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feedback-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.feedback-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.label-icon {
    font-size: 1.2rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.feedback-submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.feedback-submit-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.feedback-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.feedback-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.2rem;
}

.feedback-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.feedback-message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.feedback-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for feedback section */
@media (max-width: 768px) {
    .feedback-section {
        padding: 2rem;
    }
    
    .feedback-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .feedback-section {
        padding: 1.5rem;
    }
    
    .feedback-title {
        font-size: 1.3rem;
    }
}

