:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --surface: #ffffff;
    --surface-darker: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --hover: #f1f5f9;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 1rem;
    --radius-sm: 0.5rem;
    --success: #22c55e;
    --error: #ef4444;
    --gradient-start: #818cf8;
    --gradient-end: #6366f1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    animation: fadeIn 0.5s ease-out;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header-content {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.status {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--surface);
    padding: 1rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-family: 'Space Grotesk', sans-serif;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.status:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(99, 102, 241, 0.2);
}

.status-divider {
    width: 1px;
    height: 1rem;
    background-color: var(--border);
    margin: 0 0.5rem;
}

.uptime {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.uptime-label {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.uptime-text {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 6ch;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 2px rgba(99, 102, 241, 0.1);
}

.status-dot.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.status-dot {
    width: 12px;
    height: 12px;
    background-color: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.status-text {
    color: var(--success);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.current-time {
    color: var(--text-light);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--border);
}

h1 {
    font-weight: 800;
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
}

.converter-box {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    margin: 2rem auto;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.converter-box:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.crypto-toggle {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    z-index: 1;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: 
        0 4px 12px rgba(99, 102, 241, 0.2),
        0 0 0 2px rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.crypto-toggle:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 
        0 8px 16px rgba(99, 102, 241, 0.3),
        0 0 0 2px rgba(99, 102, 241, 0.2);
}

.crypto-toggle .crypto-icon {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.crypto-toggle.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.crypto-toggle.active .crypto-icon {
    color: white;
}

.crypto-icon {
    color: var(--primary-color);
    transition: color 0.2s;
}

.crypto-mode .currency-section {
    background: linear-gradient(to bottom right, var(--surface), var(--surface-darker));
    border: 1px solid var(--primary-color);
}

.crypto-mode .currency-usage {
    display: none;
}

.info-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.info-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.info-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-item {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    min-width: 0; /* Enable text truncation */
}

.info-item:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.2);
}

.countries-list {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(145deg, var(--surface), var(--surface-darker));
    border-radius: var(--radius);
    border: 1px solid rgba(99, 102, 241, 0.1);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(99, 102, 241, 0.1);
}

.countries-list h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.country-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.country-item img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.country-item span {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    color: var(--text);
    font-size: 0.9375rem;
}

.language-tag {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(145deg, var(--surface), var(--surface-darker));
    border-radius: 1rem;
    color: var(--text);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.2s ease;
}

.language-tag:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border-color: transparent;
}

.population,
.area {
    font-family: 'Space Grotesk', sans-serif;
    font-feature-settings: "tnum";
    font-weight: 600;
}

.region,
.capital {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
}

.conversion-group {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    position: relative;
    padding: 1rem 0;
}

.currency-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 300px;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.currency-section:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.amount-input,
.amount-display {
    width: 100%;
}

.currency-input label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.5rem;
}

.input-with-select {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    position: relative;
    background-color: var(--surface);
    border-radius: var(--radius);
    padding: 0.25rem;
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.05);
    border: 1px solid var(--border);
}

.select-with-flag {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 140px;
}

.currency-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 4px;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.input-group {
    position: relative;
    margin: 1.5rem 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-group label {
    position: absolute;
    top: -0.75rem;
    left: 1rem;
    background: var(--surface);
    padding: 0 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.input-group input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.75rem;
    padding-right: 3.5rem; /* Make room for currency indicator */
    font-size: 2rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.input-group input:focus {
    outline: none;
}

.input-group input::placeholder {
    color: var(--text-light);
    opacity: 0.5;
}

.input-group:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.input-group.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.input-group {
    background: linear-gradient(to right bottom, var(--surface), var(--surface-light));
}

.input-group:focus-within {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.input-currency {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    opacity: 0.7;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.01em;
    pointer-events: none;
    transition: all 0.2s ease;
}

.input-group:focus-within .input-currency {
    color: var(--primary-color);
    opacity: 1;
}

.section-header select {
    width: 100%;
    min-width: 250px;
    padding: 1rem 2.5rem 1rem 3.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text);
    background-color: var(--surface);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    font-weight: 500;
}

.section-header select:hover {
    border-color: var(--primary-color);
    background-color: var(--surface-darker);
}

.swap-button {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 6px -1px rgba(99, 102, 241, 0.2),
        0 2px 4px -2px rgba(99, 102, 241, 0.1);
    margin: 0 2rem;
    align-self: center;
}

.swap-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 8px -1px rgba(99, 102, 241, 0.3),
        0 4px 6px -2px rgba(99, 102, 241, 0.2);
}

.swap-button:active {
    transform: translateY(0) scale(0.95);
}

.swap-button svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.country-info {
    margin-top: 1.5rem;
    background: var(--surface-darker);
    border-radius: var(--radius);
    padding: 1.75rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.country-info:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.info-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.info-item {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.info-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.info-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.info-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-value.population,
.info-value.area {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.info-item.capital {
    grid-column: 1 / -1;
}

.info-item.capital .info-value {
    font-size: 1.375rem;
}

.info-item.languages .info-value,
.info-item.region .info-value {
    font-size: 1.125rem;
}

.crypto-mode .info-value.market-cap,
.crypto-mode .info-value.volume,
.crypto-mode .info-value.coin-price {
    font-family: 'Inter', monospace;
    font-variant-numeric: tabular-nums;
    font-size: 1.125rem; /* Slightly smaller for better fit */
}

.info-value.creator {
    font-size: 1.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.currency-usage {
    width: 100%;
    margin: 0.75rem 0;
    padding: 1rem;
    background: var(--surface-darker);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.currency-usage:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.currency-usage h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.currency-usage-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
    max-height: 120px;
    overflow-y: auto;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--surface);
}

.usage-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-light);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    cursor: default;
    background: var(--surface);
    border: 1px solid transparent;
}

.usage-item:hover {
    background-color: var(--surface);
    color: var(--text);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.usage-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: var(--shadow);
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

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

.app-info {
    margin-top: 3rem;
    padding: 2.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.app-info:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.app-info h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2.5rem;
}

.feature-list {
    display: grid;
    gap: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--surface-darker);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: var(--radius-sm);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
    flex-shrink: 0;
}

.feature-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.feature-content p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
}

.quick-tips {
    margin-top: 2.5rem;
    padding: 2rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.quick-tips h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.tips-list {
    display: grid;
    gap: 1rem;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-darker);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.tip-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.tip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: var(--radius-sm);
    color: white;
    flex-shrink: 0;
}

.tip-text {
    color: var(--text);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.update-time {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--surface-darker);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 0.875rem;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.crypto-mode .country-label {
    display: none;
}

.crypto-mode .crypto-label {
    display: inline-block !important;
}

.crypto-mode .info-value.market-cap,
.crypto-mode .info-value.volume,
.crypto-mode .info-value.coin-price {
    font-family: 'Inter', monospace;
    font-variant-numeric: tabular-nums;
}

.crypto-mode .info-value.price-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crypto-mode .info-value.price-change.positive {
    color: var(--success);
}

.crypto-mode .info-value.price-change.negative {
    color: var(--error);
}

.price-change-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .app-info {
        padding: 1.5rem;
    }

    .app-info h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .feature-item {
        padding: 1.25rem;
        gap: 1rem;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
    }

    .feature-content h3 {
        font-size: 1.125rem;
    }

    .quick-tips {
        padding: 1.5rem;
    }

    .quick-tips h2 {
        font-size: 1.5rem;
    }

    .tip-item {
        padding: 0.875rem;
    }

    .tip-icon {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 1200px) {
    body {
        padding: 1rem;
    }

    .container {
        padding: 1rem;
    }

    .converter-box {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .currency-section {
        padding: 1rem;
    }

    .amount-input input {
        font-size: 1.75rem;
        padding: 1rem;
    }

    .swap-button {
        width: 48px;
        height: 48px;
        margin: 1rem;
    }
}

@media (max-width: 768px) {
    .currency-section {
        min-width: auto;
    }

    .section-header select {
        min-width: auto;
    }

    .amount-input input {
        font-size: 1.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .info-title {
        font-size: 1.125rem;
    }
    
    .info-value {
        font-size: 1rem;
    }
    
    .country-item span {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .currency-usage-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 1200px) {
    .currency-usage {
        position: static;
        width: 100%;
        margin-top: 1rem;
    }

    #fromCurrencyUsage {
        order: 2;
    }

    #toCurrencyUsage {
        order: 2;
    }

    .currency-usage-list {
        max-height: 150px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        text-align: center;
    }

    .conversion-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .swap-button {
        transform: none;
        margin: 1rem auto;
        width: 48px;
        height: 64px;
        transform: rotate(90deg);
    }

    .input-with-select {
        flex-direction: column;
    }

    input, .result-display, select {
        width: 100%;
    }

    .converter-box {
        padding: 1.5rem;
    }

    .info-sections {
        grid-template-columns: 1fr;
        margin-top: 3rem;
        gap: 1.5rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .info-card h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .info-content {
        font-size: 0.9375rem;
    }

    .app-info {
        margin-top: 3rem;
        padding: 1rem;
    }

    .feature-grid {
        gap: 1rem;
    }

    .quick-tips {
        padding: 1.5rem;
    }

    .tips-list {
        grid-template-columns: 1fr;
    }

    .info-header h2, .tips-header h2 {
        font-size: 1.25rem;
    }

    .country-info {
        padding: 1rem;
    }

    .info-grid {
        gap: 0.75rem;
    }

    .info-value {
        font-size: 0.875rem;
    }
}

.crypto-mode .market-cap,
.crypto-mode .volume,
.crypto-mode .coin-price,
.crypto-mode .price-change {
    font-family: 'JetBrains Mono', monospace;
    font-feature-settings: "tnum";
    letter-spacing: -0.5px;
}

@media (max-width: 768px) {
    .crypto-mode .info-title {
        font-size: 1.125rem;
    }
    
    .crypto-mode .market-cap,
    .crypto-mode .volume,
    .crypto-mode .coin-price,
    .crypto-mode .price-change {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .country-info {
        padding: 1.25rem;
    }

    .info-title {
        font-size: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .info-grid {
        gap: 1rem;
    }

    .info-item {
        padding: 1rem;
    }

    .info-value {
        font-size: 1.125rem;
    }

    .info-item.capital .info-value {
        font-size: 1.25rem;
    }

    .info-item.languages .info-value,
    .info-item.region .info-value {
        font-size: 1rem;
    }
}

/* Crypto Market Overview Styles */
.crypto-market-overview {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease, opacity 0.3s ease;
    display: none;
    opacity: 0;
}

.crypto-market-overview:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(99, 102, 241, 0.2);
}

.crypto-market-overview h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.market-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(145deg, var(--surface), var(--surface-darker));
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stat-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.top-movers h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

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

.mover-card {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 1rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.mover-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.mover-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.mover-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.mover-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--text);
}

.mover-symbol {
    color: var(--text-light);
    font-size: 0.875rem;
}

.mover-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.mover-change {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 500;
}

.mover-change.positive {
    color: var(--success);
}

.mover-change.negative {
    color: var(--error);
}

@media (max-width: 768px) {
    .crypto-market-overview {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }

    .crypto-market-overview h2 {
        font-size: 1.5rem;
    }

    .market-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .movers-grid {
        grid-template-columns: 1fr;
    }
}
