:root {
    --bg-color: #0f0f13;
    --card-bg: rgba(255, 255, 255, 0.05);
    --primary-color: #00d2ff;
    --secondary-color: #9d00ff;
    --text-color: #ffffff;
    --text-muted: #8b8b9b;
    --border-color: rgba(255, 255, 255, 0.1);
    --gradient-main: linear-gradient(135deg, #00d2ff 0%, #9d00ff 100%);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --font-family: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Gradients */
body::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(157, 0, 255, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    filter: blur(100px);
}

body::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    filter: blur(100px);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    backdrop-filter: blur(10px);
    border-bottom: var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 600px;
}

/* Exchange Widget */
/* Exchange Widget */
.exchange-widget {
    background: #141419;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.input-group {
    margin-bottom: 2rem;
    text-align: left;
}

.input-group label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.input-wrapper {
    display: flex;
    background: #0f0f13;
    /* Darker than widget */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0.5rem 1rem;
    align-items: center;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    background: #0f0f13;
    border-color: rgba(0, 210, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.15);
}

.input-wrapper input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    width: auto;
    flex: 1;
    min-width: 0;
    outline: none;
    padding: 0.5rem 0;
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.exchange-btn {
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: 16px;
    background: var(--gradient-main);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.exchange-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 210, 255, 0.4);
}

.exchange-btn:active {
    transform: translateY(-1px);
}

.exchange-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.exchange-btn:hover::after {
    opacity: 1;
}

/* Coin List */
.coin-list {
    padding: 4rem 5%;
}

.coin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.coin-card {
    background: var(--card-bg);
    border: var(--glass-border);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s;
}

.coin-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.coin-ticker {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.coin-name {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    border-top: var(--glass-border);
    margin-top: 4rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1.5rem;
    }

    .exchange-widget {
        padding: 1.5rem;
    }

    nav {
        margin-top: 1rem;
    }

    nav a {
        margin: 0 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    /* Receipt Styling */
    .receipt-card {
        text-align: center;
        animation: fadeIn 0.5s ease-out;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .status-badge {
        background: rgba(255, 230, 0, 0.2);
        color: #ffe600;
        display: inline-block;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        font-weight: 600;
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
        border: 1px solid rgba(255, 230, 0, 0.3);
    }

    .pulse {
        animation: pulse 2s infinite;
    }

    @keyframes pulse {
        0% {
            box-shadow: 0 0 0 0 rgba(255, 230, 0, 0.4);
        }

        70% {
            box-shadow: 0 0 0 10px rgba(255, 230, 0, 0);
        }

        100% {
            box-shadow: 0 0 0 0 rgba(255, 230, 0, 0);
        }
    }

    .amount-highlight {
        display: block;
        font-size: 1.8rem;
        color: var(--primary-color);
        margin: 0.5rem 0 1.5rem;
    }

    .address-box {
        background: rgba(0, 0, 0, 0.4);
        padding: 1rem;
        border-radius: 12px;
        position: relative;
        border: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 2rem;
        word-break: break-all;
    }

    .address-val {
        font-family: monospace;
        font-size: 1.1rem;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .copy-btn {
        background: var(--card-bg);
        border: 1px solid var(--primary-color);
        color: var(--primary-color);
        padding: 0.3rem 0.8rem;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.8rem;
        transition: all 0.2s;
    }

    .copy-btn:hover {
        background: var(--primary-color);
        color: #000;
    }

    .receipt-info {
        font-size: 0.95rem;
        color: var(--text-muted);
    }

    .mono {
        font-family: monospace;
        color: #fff;
    }

    .warning-text {
        font-size: 0.8rem;
        color: #ff4d4d;
        margin-top: 1.5rem;
        line-height: 1.4;
        background: rgba(255, 77, 77, 0.1);
        padding: 0.5rem;
        border-radius: 8px;
    }

    .refresh-btn {
        margin-top: 1.5rem;
        background: transparent;
        border: none;
        color: var(--text-muted);
        text-decoration: underline;
        cursor: pointer;
    }
}

/* Custom Dropdown Styling */
.custom-select-wrapper {
    position: relative;
    width: 160px;
    /* Slightly wider */
    flex-shrink: 0;
    z-index: 20;
    margin-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-select {
    position: relative;
    cursor: pointer;
    user-select: none;
    height: 100%;
}

.select-selected {
    background: transparent;
    color: #fff;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.3s;
    border-radius: 12px;
}

.select-selected:hover {
    background: rgba(255, 255, 255, 0.05);
}

.select-selected span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    /* Force truncation for long names */
    display: block;
}

.arrow-down {
    border: solid #fff;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    margin-left: auto;
    transition: transform 0.3s;
}

.select-hide+.select-selected .arrow-down {
    /* State changes could be rotated */
}

.coin-icon-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.select-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background-color: #1a1a20;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-top: 5px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 400px;
}

.select-hide {
    display: none;
}

.select-search {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    background: #1a1a20;
    position: sticky;
    top: 0;
}

.select-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
}

.select-search input:focus {
    border-color: var(--primary-color);
}

.select-list {
    overflow-y: auto;
    flex-grow: 1;
}

.select-list::-webkit-scrollbar {
    width: 6px;
}

.select-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.select-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.select-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.select-item img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.select-item .ticker {
    font-weight: 700;
    color: #fff;
    width: 50px;
}

.select-item .name {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    display: block;
}

/* Currency Page Controls */
.currency-controls {
    position: sticky;
    top: 80px;
    z-index: 90;
    padding: 1.5rem 0;
    background: #0f0f13;
    /* Solid background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.search-input {
    background: #1a1a20;
    /* Solid */
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 1rem 1.5rem;
    width: 100%;
    max-width: 500px;
    color: #fff;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    background: #1a1a20;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
}

.network-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    max-width: 800px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: #fff;
}

.filter-btn.active {
    background: var(--gradient-main);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.network-title {
    margin: 3rem 0 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid var(--primary-color);
    color: #fff;
    font-size: 1.5rem;
}