/* ==========================================================================
   Premium Fintech Conversion Architecture Variables
   ========================================================================== */

:root {
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.02), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    --radius: 18px;
    --radius-sm: 12px;
    --font-stack: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

/* Reset / Core Architecture Normalization Elements */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-stack);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Navigation Component Layout Framework
   ========================================================================== */
.app-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.4rem;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.header-contact {
    display: flex;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.contact-item:hover {
    color: var(--text-main);
}

/* ==========================================================================
   Central Conversion Grid Space Frame
   ========================================================================== */
.converter-workspace {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.converter-card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 580px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-lg);
}

.card-header {
    text-align: center;
    margin-bottom: 2.25rem;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.card-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Form Controls and UI Infrastructure */
.input-group {
    margin-bottom: 1.75rem;
    display: flex;
    flex-direction: column;
}

.input-group label, .control-box label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
}

.amount-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-prefix {
    position: absolute;
    left: 1.25rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
    pointer-events: none;
}

.amount-field-wrapper input {
    width: 100%;
    font-family: var(--font-stack);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 1rem 1.25rem 1rem 2.5rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
}

.amount-field-wrapper input:focus {
    border-color: var(--primary);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

/* Input Type Spinner Removal Ruleset */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ==========================================================================
   Matrix Select & Exchange Swap Action Layout Element
   ========================================================================== */
.currency-matrix {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 2rem;
}

.control-box {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.select-box {
    display: flex;
    align-items: center;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 1rem;
    height: 54px;
    transition: var(--transition);
}

.select-box:focus-within {
    border-color: var(--primary);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.flag-icon {
    width: 24px;
    height: auto;
    object-fit: contain;
    border-radius: 2px;
    margin-right: 0.75rem;
}

.select-box select {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-stack);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    padding: 1rem 0;
}

/* Swap Action Infrastructure Elements */
.swap-action-container {
    padding-bottom: 4px;
}

.btn-swap {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--primary);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.btn-swap:hover {
    background-color: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
    transform: rotate(180deg);
}

.btn-swap:active {
    transform: scale(0.92) rotate(180deg);
}

/* Main Form Trigger Configuration */
.btn {
    width: 100%;
    font-family: var(--font-stack);
    font-size: 1rem;
    font-weight: 600;
    padding: 1.1rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 22px rgba(37, 99, 235, 0.35);
}

/* Loading Framework Element */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #FFFFFF;
    animation: spin 0.65s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   Premium Output Component Card
   ========================================================================== */
.result-card {
    background-color: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-top: 2rem;
    animation: fadeIn 0.45s var(--transition);
}

.result-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.expression-group {
    display: flex;
    flex-direction: column;
}

.base-value {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.converted-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.btn-copy {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-copy:hover {
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.3);
    background-color: rgba(37, 99, 235, 0.02);
}

.result-meta {
    border-top: 1px solid var(--border-color);
    padding-top: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rate-info {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.timestamp-info {
    font-size: 0.75rem;
    color: var(--text-light);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   System Notification Component Setup
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1000;
}

.toast {
    background-color: #0F172A;
    color: #FFFFFF;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-premium), 0 12px 30px rgba(15, 23, 42, 0.1);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.4s var(--transition);
    transition: var(--transition);
}

.toast i { color: #10B981; } /* Success default indicator color */
.toast.info i { color: #3B82F6; }
.toast.danger i { color: #EF4444; }

@keyframes slideIn {
    from { transform: translateX(100%) translateY(5px); opacity: 0; }
    to { transform: translateX(0) translateY(0); opacity: 1; }
}

/* ==========================================================================
   Footer Component Configuration
   ========================================================================== */
.app-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.heart {
    color: #EF4444;
    display: inline-block;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-main);
}