@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #fbbf24;
    --glass-blur: blur(12px);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 450px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.header {
    text-align: center;
    margin-bottom: 32px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.header p {
    color: var(--text-muted);
    font-size: 14px;
}

.logo {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    margin-left: 4px;
}

input,
select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: white;
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

input:focus,
select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

select option {
    background: #1e293b;
    color: white;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0;
    cursor: pointer;
}

.btn-buy {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-buy:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.btn-buy:active {
    transform: translateY(0);
}

.btn-buy:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.network-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.network-item {
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.5;
}

.network-item.active {
    opacity: 1;
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.network-item img {
    width: 100%;
    max-width: 40px;
    height: auto;
    filter: grayscale(1);
    transition: var(--transition);
}

.network-item.active img {
    filter: grayscale(0);
}

.network-item span {
    display: block;
    font-size: 10px;
    margin-top: 5px;
    font-weight: 500;
}

.network-item.disabled {
    pointer-events: none;
    opacity: 0.2;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Tweaks */
@media (max-width: 480px) {
    .card {
        padding: 24px;
        border-radius: 18px;
    }

    .header h1 {
        font-size: 24px;
    }
}