Загрузка данных
:root {
--bg: #f6f8fc;
--surface: rgba(255, 255, 255, 0.92);
--surface-strong: #ffffff;
--line: #e5eaf2;
--text: #111827;
--muted: #6b7280;
--primary: #2563eb;
--primary-soft: #eff6ff;
--success: #059669;
--danger: #dc2626;
--shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
--radius: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
margin: 0;
min-height: 100vh;
font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
color: var(--text);
background:
radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.08), transparent 28rem),
radial-gradient(circle at 100% 10%, rgba(14, 165, 233, 0.06), transparent 24rem),
var(--bg);
}
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.page-shell {
width: min(100% - 32px, 980px);
margin: 0 auto;
padding: 52px 0 32px;
}
.hero {
display: flex;
justify-content: space-between;
align-items: flex-end;
gap: 32px;
margin-bottom: 30px;
}
.eyebrow, .section-label {
color: var(--primary);
font-size: 0.74rem;
font-weight: 800;
letter-spacing: 0.09em;
text-transform: uppercase;
}
.eyebrow {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 14px;
}
.status-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--success);
box-shadow: 0 0 0 5px rgba(5, 150, 105, 0.1);
}
.hero h1 {
margin: 0;
font-size: clamp(2.7rem, 7vw, 5.3rem);
line-height: 0.94;
letter-spacing: -0.055em;
}
.hero h1 span { color: var(--primary); }
.hero p {
max-width: 580px;
margin: 20px 0 0;
color: var(--muted);
font-size: 1rem;
line-height: 1.65;
}
.hero-mark {
width: 72px;
height: 72px;
flex: 0 0 auto;
display: grid;
place-items: center;
border-radius: 22px;
background: var(--text);
color: white;
font-size: 2rem;
transform: rotate(-8deg);
}
.converter-card, .result-card, .panel {
background: var(--surface);
border: 1px solid rgba(255, 255, 255, 0.9);
box-shadow: var(--shadow);
backdrop-filter: blur(14px);
border-radius: var(--radius);
}
.converter-card {
padding: 26px;
margin-bottom: 18px;
position: relative;
z-index: 20;
}
.card-heading, .panel-heading, .result-topline, .result-main {
display: flex;
justify-content: space-between;
align-items: center;
gap: 16px;
}
h2 {
margin: 5px 0 0;
font-size: 1.25rem;
letter-spacing: -0.02em;
}
.app-status {
max-width: 45%;
color: var(--muted);
font-size: 0.78rem;
text-align: right;
}
.app-status.success { color: var(--success); }
.app-status.error { color: var(--danger); }
.converter-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
align-items: center;
gap: 14px;
margin-top: 22px;
}
.currency-box {
display: block;
min-width: 0;
padding: 14px 16px;
border: 1px solid var(--line);
border-radius: 18px;
background: var(--surface-strong);
}
.currency-box > span {
display: block;
margin-bottom: 8px;
color: var(--muted);
font-size: 0.72rem;
font-weight: 700;
}
.currency-input-row {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
align-items: center;
gap: 10px;
}
.currency-dropdown {
position: relative;
width: 100%;
min-width: 0;
z-index: 10;
}
.currency-dropdown.open {
z-index: 1000;
}
.currency-dropdown-button {
width: 100%;
min-width: 0;
min-height: 48px;
padding: 0 14px;
display: flex;
align-items: center;
justify-content: space-between;
border: 1px solid var(--line);
border-radius: 12px;
background: var(--surface);
color: var(--text);
cursor: pointer;
font: inherit;
text-align: left;
transition:
border-color 0.2s ease,
box-shadow 0.2s ease,
background 0.2s ease;
}
.currency-dropdown-button:hover {
border-color: var(--primary);
}
.currency-dropdown.open .currency-dropdown-button {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}
.currency-dropdown-current {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.currency-flag {
flex: 0 0 auto;
font-size: 1.25rem;
line-height: 1;
}
.currency-code {
font-weight: 700;
letter-spacing: 0.02em;
}
.currency-name {
color: var(--muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.currency-dropdown-arrow {
flex: 0 0 auto;
margin-left: 10px;
font-size: 1.1rem;
color: var(--muted);
transition: transform 0.2s ease;
}
.currency-dropdown.open .currency-dropdown-arrow {
transform: rotate(180deg);
}
.currency-dropdown-menu {
position: absolute;
z-index: 1000;
top: calc(100% + 8px);
left: 0;
right: 0;
max-height: 320px;
overflow-y: auto;
padding: 6px;
background: var(--surface);
border: 1px solid var(--line);
border-radius: 14px;
box-shadow: 0 14px 35px rgba(15, 23, 42, 0.15);
opacity: 0;
visibility: hidden;
transform: translateY(-5px);
transition:
opacity 0.15s ease,
transform 0.15s ease,
visibility 0.15s ease;
}
.currency-dropdown.open .currency-dropdown-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.currency-option {
width: 100%;
display: flex;
align-items: center;
gap: 10px;
padding: 10px 11px;
border: 0;
border-radius: 9px;
background: transparent;
color: var(--text);
cursor: pointer;
font: inherit;
text-align: left;
transition: background 0.15s ease;
}
.currency-option:hover {
background: var(--bg);
}
.currency-option-info {
min-width: 0;
display: flex;
align-items: baseline;
gap: 8px;
}
.currency-option-code {
font-weight: 700;
flex: 0 0 auto;
}
.currency-option-name {
color: var(--muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.currency-dropdown-menu::-webkit-scrollbar {
width: 7px;
}
.currency-dropdown-menu::-webkit-scrollbar-thumb {
border-radius: 10px;
background: var(--line);
}
.amount-input {
width: 100%;
min-width: 0;
border: 0;
outline: 0;
background: transparent;
color: var(--text);
font-size: clamp(1.7rem, 4vw, 2.3rem);
font-weight: 750;
letter-spacing: -0.035em;
}
.amount-input::placeholder { color: #c5cad4; }
.amount-input::-webkit-inner-spin-button { opacity: 0.5; }
.result-input.loading { opacity: 0.45; }
.currency-select {
min-width: 82px;
max-width: 110px;
padding: 10px 28px 10px 11px;
border: 1px solid var(--line);
border-radius: 12px;
background: #f8fafc;
color: var(--text);
font-size: 0.86rem;
font-weight: 800;
outline: none;
cursor: pointer;
}
.currency-select:focus { border-color: #93b4f7; box-shadow: 0 0 0 4px var(--primary-soft); }
.currency-select:disabled { cursor: wait; opacity: 0.55; }
.swap-btn {
width: 46px;
height: 46px;
flex: 0 0 46px;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
border: 1px solid var(--line);
border-radius: 50%;
background: var(--surface-strong);
color: #000;
box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
cursor: pointer;
transition:
background 0.2s ease,
border-color 0.2s ease,
box-shadow 0.2s ease,
transform 0.15s ease;
}
.swap-btn span {
display: block;
font-size: 1.45rem;
line-height: 1;
font-weight: 500;
color: #000;
transform: translateY(-1px);
}
.swap-btn:hover {
background: var(--primary-soft);
border-color: #b8cdf9;
box-shadow: 0 8px 20px rgba(37, 99, 235, 0.14);
}
.swap-btn:hover span {
transform: translateY(-1px);
}
.swap-btn:active {
transform: scale(0.94);
}
.swap-btn:disabled {
opacity: 0.45;
cursor: not-allowed;
}
.result-card {
padding: 24px 26px;
margin-bottom: 18px;
position: relative;
z-index: 1;
}
.result-topline { margin-bottom: 16px; }
.source-badge {
padding: 6px 9px;
border-radius: 999px;
background: #f1f5f9;
color: var(--muted);
font-size: 0.7rem;
font-weight: 750;
}
.result-main { align-items: flex-end; }
.result-value { font-size: clamp(2.5rem, 7vw, 4rem); font-weight: 800; letter-spacing: -0.055em; }
.result-currency { margin-left: 8px; color: var(--muted); font-size: 1rem; font-weight: 750; }
.result-change { color: var(--muted); font-size: 0.88rem; font-weight: 650; text-align: right; }
.result-footer { margin-top: 8px; color: var(--muted); font-size: 0.75rem; }
.panel { padding: 24px 26px; margin-bottom: 18px; }
.panel-heading { align-items: flex-end; margin-bottom: 18px; }
.panel-heading.compact { align-items: center; }
.panel-meta { color: var(--muted); font-size: 0.76rem; text-align: right; }
.chart-container {
position: relative;
width: 100%;
height: 330px;
}
.chart-info {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 4px;
}
.chart-section {
position: relative;
z-index: 1;
}
.chart-status {
color: var(--muted);
font-size: 0.75rem;
}
.chart-status.positive { color: var(--success); }
.chart-status.negative { color: var(--danger); }
.chart-status.error { color: var(--danger); }
.popular-grid {
display: grid;
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: 10px;
}
.popular-card {
min-width: 0;
padding: 15px 10px;
border: 1px solid var(--line);
border-radius: 16px;
background: #fbfcfe;
text-align: left;
cursor: pointer;
transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.popular-card:hover { transform: translateY(-2px); border-color: #bdd0f7; background: var(--primary-soft); }
.popular-code { display: block; font-weight: 850; }
.popular-rate { display: block; margin-top: 8px; font-size: 0.9rem; font-weight: 700; }
.popular-caption { display: block; margin-top: 2px; color: var(--muted); font-size: 0.64rem; }
.show-all-btn {
width: 100%;
margin-top: 12px;
padding: 12px 14px;
border: 1px solid var(--line);
border-radius: 13px;
background: transparent;
color: var(--text);
font-size: 0.82rem;
font-weight: 750;
cursor: pointer;
}
.show-all-btn:hover { background: #f8fafc; }
.hidden { display: none; }
.table-wrap { overflow-x: auto; }
.rates-table { width: 100%; border-collapse: collapse; }
.rates-table th, .rates-table td { padding: 12px 8px; border-bottom: 1px solid #eef1f5; text-align: left; }
.rates-table th { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: .06em; }
.rates-table td:last-child, .rates-table th:last-child { text-align: right; }
.rates-table tr:last-child td { border-bottom: 0; }
.site-footer {
display: flex;
justify-content: space-between;
align-items: center;
gap: 20px;
padding: 24px 0 10px;
color: var(--muted);
font-size: 0.85rem;
}
.site-footer a {
color: inherit;
font-weight: 600;
text-decoration: none;
}
.site-footer a:hover {
text-decoration: underline;
}
@media (max-width: 760px) {
.page-shell { width: min(100% - 20px, 680px); padding-top: 28px; }
.hero { align-items: flex-start; }
.hero-mark { display: none; }
.hero h1 { font-size: clamp(2.5rem, 15vw, 4rem); }
.hero p { margin-top: 14px; }
.converter-card, .result-card, .panel { padding: 20px; border-radius: 20px; }
.converter-grid { grid-template-columns: 1fr; gap: 10px; }
.swap-btn { margin: -2px auto; transform: none; }
.swap-btn:hover { transform: none; }
.swap-btn:hover span { transform: scale(1.12); }
.app-status { max-width: 48%; }
.popular-grid { grid-template-columns: repeat(3, 1fr); }
.chart-container { height: 260px; }
.chart-status { position: static; margin-top: 8px; }
.site-footer { flex-direction: column; text-align: center;}
}
@media (max-width: 430px) {
.page-shell { width: min(100% - 14px, 680px); }
.hero { margin-bottom: 20px; }
.card-heading, .panel-heading, .result-main { align-items: flex-start; flex-direction: column; }
.app-status { max-width: 100%; text-align: left; }
.result-main { gap: 8px; }
.result-change { text-align: left; }
.popular-grid { grid-template-columns: repeat(2, 1fr); }
.currency-input-row { grid-template-columns: minmax(0, 1fr) auto; }
}