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

/* Dark Mode Variables (Default) */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;

    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --border-color: #334155;
    --border-light: #475569;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 25px 50px -12px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 30px 60px -15px rgb(0 0 0 / 0.5);

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Light Mode Variables */
[data-theme="light"] {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent-color: #8b5cf6;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;

    --bg-primary: #faf8f3;
    --bg-secondary: #fffef9;
    --bg-card: #fffef9;
    --bg-card-hover: #f5f3ed;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --border-color: #e8e5dd;
    --border-light: #d4cfc3;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.15);

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-bg: linear-gradient(135deg, #faf8f3 0%, #f5ebe0 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
    transition: opacity 0.3s ease;
    background:
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
}

[data-theme="light"] body::before {
    background:
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.03) 0%, transparent 70%);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    position: absolute;
    transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem;
    position: relative;
    z-index: 1;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease-out;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
}

.nav-link:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo-icon-img {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 8px 16px rgba(99, 102, 241, 0.4));
    animation: float 3s ease-in-out infinite;
}

.logo-letter-img {
    height: 110px;
    width: auto;
}

.logo-image {
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 8px 16px rgba(99, 102, 241, 0.4));
    animation: float 3s ease-in-out infinite;
}

.logo-icon {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 8px 16px rgba(99, 102, 241, 0.4));
    animation: float 3s ease-in-out infinite;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.25rem;
}

/* Main Content */
.main-content {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Card Header */
.card-header {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.card-badge {
    padding: 0.5rem 1.25rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.mode-btn {
    flex: 1;
    min-width: 160px;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
}

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

.mode-btn.active {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.mode-icon {
    font-size: 1.25rem;
}

/* Swap Button */
.swap-button {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: 2px solid var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    z-index: 10;
    margin: 0 auto;
    animation: bounce 3s ease-in-out infinite;
}

.swap-button:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    animation: none;
    transform: rotate(180deg) scale(1.15);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.5);
}

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

.swap-button svg {
    width: 28px;
    height: 28px;
}

.conversion-icon {
    position: relative;
}

/* Calculator Card */
.calculator-card {
    background: var(--bg-card);
    border-radius: 32px;
    padding: clamp(1.25rem, 3.5vw, 2rem);
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--border-color);
    margin-bottom: 3rem;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calculator-card:hover::before {
    opacity: 1;
}

.calculator-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--primary-color);
    border-color: var(--primary-color);
}

/* Input Groups */
.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

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

/* Select Styles */
.select-wrapper {
    position: relative;
    margin-bottom: 1.25rem;
}

.custom-select {
    width: 100%;
    padding: 1.125rem 3.5rem 1.125rem 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    font-family: 'Inter', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    box-shadow: var(--shadow-sm);
}

.custom-select option {
    font-family: 'Inter', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    padding: 0.5rem;
}

.custom-select:hover {
    border-color: var(--primary-color);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow);
}

.custom-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), var(--shadow);
}

.select-arrow {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.select-wrapper:hover .select-arrow {
    color: var(--primary-color);
}

/* Input Styles */
.crypto-amount-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    z-index: 1;
}

.custom-input {
    width: 100%;
    padding: 1.5rem 6rem 1.5rem 4rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    box-shadow: var(--shadow-sm);
}

.custom-input:hover {
    border-color: var(--primary-color);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow);
}

.custom-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), var(--shadow);
}

.input-label {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
    font-weight: 700;
    background: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    color: white;
}

/* Conversion Icon */
.conversion-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0;
    position: relative;
}

.conversion-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    animation: bounce 3s ease-in-out infinite;
}

.conversion-icon-wrapper svg {
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.1); }
}

/* Result Display */
.result-display {
    padding: 1.25rem 1.5rem;
    background: var(--gradient-primary);
    border-radius: 20px;
    text-align: center;
    font-size: clamp(1.5rem, 4.5vw, 2.75rem);
    font-weight: 700;
    color: white;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-all;
    position: relative;
    overflow: hidden;
}

.result-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.result-display:hover::before {
    left: 100%;
}

.loading {
    font-size: 1.25rem;
    opacity: 0.95;
    animation: pulse 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.loading-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.95; }
    50% { opacity: 0.7; }
}

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

/* Disclaimer Text */
.disclaimer-text {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: center;
    opacity: 0.8;
    line-height: 1.4;
}

/* Price Info */
.price-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.price-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.price-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.price-change {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

.price-change.negative {
    color: var(--danger-color);
}

.price-change::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
}

.price-change.positive::before {
    border-bottom: 8px solid var(--success-color);
}

.price-change.negative::before {
    border-top: 8px solid var(--danger-color);
}

/* Update Info */
.update-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.update-icon {
    animation: rotate-slow 3s linear infinite;
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2.5rem;
    border: 2px solid var(--border-color);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(10deg);
}

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

.feature-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Info Section */
.info-section {
    margin-bottom: 3rem;
}

.info-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 2.5rem;
}

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

.step-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--shadow);
}

.step-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.step-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
    text-align: center;
}

.step-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 3rem;
}

.faq-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 2.5rem;
}

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

.faq-item {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

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

.faq-item h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.faq-item p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: 2px solid var(--border-color);
    margin-top: 3rem;
}

.footer p {
    margin-bottom: 0.75rem;
}

.footer-links {
    margin: 1rem 0;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-copyright {
    font-weight: 600;
    color: var(--text-primary);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }

    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }

    .container {
        padding: 1rem;
    }

    .header {
        margin-bottom: 2rem;
        margin-top: 3rem;
    }

    .logo {
        flex-direction: row;
        gap: 0.75rem;
    }

    .logo-icon-img {
        height: 60px;
    }

    .logo-letter-img {
        height: 75px;
    }

    .logo-image {
        max-width: 280px;
    }

    .logo-icon {
        width: 52px;
        height: 52px;
    }

    .calculator-card {
        padding: 1.75rem;
        border-radius: 24px;
    }

    .custom-input {
        font-size: 1.5rem;
        padding: 1.25rem 5rem 1.25rem 3.5rem;
    }

    .input-icon {
        font-size: 1.25rem;
        left: 1.25rem;
    }

    .input-label {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    .result-display {
        font-size: 2rem;
        padding: 1.5rem 1.25rem;
    }

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

    .price-value, .price-change {
        font-size: 1.25rem;
    }

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

    .feature-card {
        padding: 2rem;
    }

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

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

@media (max-width: 480px) {
    .custom-select {
        padding: 1rem 3rem 1rem 1.25rem;
        font-size: 0.9375rem;
    }

    .custom-input {
        font-size: 1.25rem;
        padding: 1rem 4.5rem 1rem 3rem;
    }

    .input-icon {
        font-size: 1.125rem;
        left: 1rem;
    }

    .input-label {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
        right: 1rem;
    }

    .result-display {
        font-size: 1.5rem;
    }

    .card-badge {
        font-size: 0.75rem;
        padding: 0.375rem 1rem;
    }

    .mode-btn {
        min-width: 140px;
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }

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

    .swap-button svg {
        width: 24px;
        height: 24px;
    }
}

/* Remove spinner from number input */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Smooth transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-duration: 0.2s;
    transition-timing-function: ease-in-out;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Legal Pages */
.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 24px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.legal-page h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.legal-page .last-updated {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.legal-page .intro-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.legal-page section {
    margin-bottom: 2.5rem;
}

.legal-page h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-page h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-page p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.legal-page ul {
    list-style: disc;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-page li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.legal-page a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.legal-page a:hover {
    color: var(--primary-light);
}

.legal-page strong {
    color: var(--text-primary);
    font-weight: 600;
}

.disclaimer-box {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--danger-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.disclaimer-box h2 {
    color: var(--danger-color);
    margin-top: 0;
}

.back-link {
    margin-top: 3rem;
    text-align: center;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.back-link a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.contact-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.contact-link {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.05);
}

.contact-card .note {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: 0.5rem;
}

.faq-contact {
    margin-top: 3rem;
}

.faq-list {
    margin-top: 2rem;
}

.faq-item-contact {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.faq-item-contact:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.faq-item-contact h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.feedback-section,
.legal-contact {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin: 2rem 0;
}

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

.response-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.response-item strong {
    color: var(--text-primary);
}

.response-item span {
    color: var(--primary-color);
    font-weight: 600;
}

.contact-note {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.contact-note p {
    margin: 0;
    color: var(--text-primary);
}

/* Mobile Responsiveness for Legal Pages */
@media (max-width: 768px) {
    .legal-page {
        padding: 1.5rem;
    }

    .legal-page h1 {
        font-size: 2rem;
    }

    .legal-page h2 {
        font-size: 1.5rem;
    }

    .legal-page ul {
        margin-left: 1.5rem;
    }

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

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

/* Custom Select with Flag Icons */
.custom-select-wrapper {
    position: relative;
}

.custom-select-wrapper .custom-select {
    display: none;
}

.custom-select-trigger {
    width: 100%;
    padding: 1.125rem 3.5rem 1.125rem 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.custom-select-trigger:hover {
    border-color: var(--primary-color);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow);
}

.custom-select-trigger .fi {
    font-size: 1.5rem;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select-wrapper.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.custom-select-option:hover {
    background: var(--bg-card-hover);
}

.custom-select-option.selected {
    background: var(--primary-color);
    color: white;
}

.custom-select-option .fi {
    font-size: 1.5rem;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.custom-select-options::-webkit-scrollbar {
    width: 8px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: var(--bg-card);
    border-radius: 10px;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Market Statistics */
.market-stats {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    animation: slideDown 0.5s ease;
}

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

.stats-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.stats-icon {
    font-size: 1.75rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    border-color: var(--primary-light);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
}

.detail-button-wrapper {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.view-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.view-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.view-detail-btn svg {
    transition: transform 0.3s ease;
}

.view-detail-btn:hover svg {
    transform: translateX(4px);
}

/* Responsive adjustments for market stats */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .market-stats {
        padding: 1.5rem;
    }

    .stats-title {
        font-size: 1.25rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .view-detail-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .market-stats {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .stats-title {
        font-size: 1.125rem;
    }

    .stat-label {
        font-size: 0.8125rem;
    }

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

/* Crypto Detail Page */
.crypto-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.crypto-title-section {
    flex: 1;
}

.crypto-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-family: 'Poppins', sans-serif;
}

.crypto-subtitle {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.crypto-symbol-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
}

.crypto-rank {
    color: var(--text-secondary);
    font-weight: 500;
}

.price-section {
    text-align: right;
}

.current-price-large {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    margin-bottom: 0.5rem;
}

.price-change-large {
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
}

.price-change-large.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.price-change-large.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.time-period-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.period-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-card-hover);
}

.period-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
}

.chart-container {
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    height: 400px;
}

.detail-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-stat-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.detail-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.detail-stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.stat-big-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    margin-bottom: 0.5rem;
}

.stat-small-text {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.stat-small-text.positive {
    color: var(--success-color);
}

.stat-small-text.negative {
    color: var(--danger-color);
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.official-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.official-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

.crypto-description-section {
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.crypto-description-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.crypto-description {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.crypto-description p {
    margin-bottom: 1rem;
}

/* Responsive adjustments for detail page */
@media (max-width: 1024px) {
    .detail-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .crypto-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .price-section {
        text-align: left;
        width: 100%;
    }

    .crypto-detail-title {
        font-size: 1.75rem;
    }

    .current-price-large {
        font-size: 2rem;
    }

    .price-change-large {
        font-size: 1rem;
    }

    .time-period-selector {
        justify-content: space-between;
    }

    .period-btn {
        flex: 1;
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }

    .chart-container {
        height: 300px;
        padding: 1.5rem;
    }

    .detail-stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .crypto-header {
        padding: 1.5rem;
    }

    .crypto-detail-title {
        font-size: 1.5rem;
    }

    .current-price-large {
        font-size: 1.75rem;
    }

    .chart-container {
        height: 250px;
        padding: 1rem;
    }

    .detail-stat-card {
        padding: 1.25rem;
    }

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