@import url('./variables.css');

/* ==========================================================
   RESET & BASE STYLES
   ========================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    min-width: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    max-width: 100% !important;
    overflow-x: hidden !important;
    width: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(0, 210, 255, 0.09) 0%, transparent 60%),
        radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 15% 70%, rgba(0, 102, 255, 0.06) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    max-width: 100% !important;
    overflow-x: hidden !important;
    position: relative;
    width: 100%;
}

img, svg, video, canvas {
    max-width: 100%;
    height: auto;
}

.mono, code, pre {
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* Subtle background grid pattern */
.bg-grid-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
    mask-image: radial-gradient(circle at 50% 50%, black 60%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 60%, transparent 100%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* Links & Typography */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-main);
}

p {
    color: var(--text-muted);
}

.text-gradient {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-gradient-purple {
    background: var(--grad-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-gradient-gold {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.mono {
    font-family: var(--font-mono);
}

/* ==========================================================
   LAYOUT CONTAINERS
   ========================================================== */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    position: relative;
    z-index: 1;
}

.section {
    padding: 5rem 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 3.5rem;
}

.section-header .section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(var(--primary-blue-rgb), 0.1);
    border: 1px solid rgba(var(--primary-blue-rgb), 0.3);
    color: var(--primary-blue);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: 1.05rem;
}

/* ==========================================================
   HEADER & NAVBAR
   ========================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: rgba(5, 8, 20, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
}

.brand-logo img {
    height: 44px;
    width: 44px;
    border-radius: var(--radius-full);
    filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.45));
    transition: transform var(--transition-fast);
}

.brand-logo:hover img {
    transform: scale(1.05) rotate(4deg);
}

.brand-name {
    display: flex;
    flex-direction: column;
}

.brand-name .brand-title {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: var(--text-main);
    line-height: 1;
}

.brand-name .brand-sub {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary-blue);
    letter-spacing: 0.14em;
    margin-top: 0.15rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 0.25rem;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--grad-primary);
    transition: width var(--transition-normal);
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Network Badge */
.network-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.network-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--emerald-green);
    box-shadow: 0 0 8px var(--emerald-green);
}

.network-dot.wrong-network {
    background-color: var(--crimson-red);
    box-shadow: 0 0 8px var(--crimson-red);
}

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.6rem;
    font-size: 0.925rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: none;
    outline: none;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    user-select: none;
}

.btn-sm {
    padding: 0.45rem 0.95rem;
    font-size: 0.825rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 1rem 2.2rem;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

.btn-primary {
    background: var(--grad-primary);
    color: var(--text-inverse);
    box-shadow: var(--glow-blue);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-blue-lg);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(var(--primary-blue-rgb), 0.1);
    border: 1px solid rgba(var(--primary-blue-rgb), 0.4);
    color: var(--primary-blue);
}

.btn-secondary:hover {
    background: rgba(var(--primary-blue-rgb), 0.2);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.btn-glass {
    background: var(--bg-glass);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    backdrop-filter: blur(10px);
}

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

.btn-wallet {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.15) 0%, rgba(0, 102, 255, 0.2) 100%);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-full);
}

.btn-wallet:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
}

.btn:disabled, .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================================
   CARDS & CONTAINERS
   ========================================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
    border-color: var(--border-card-hover);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 210, 255, 0.12);
}

.card-solid {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ==========================================================
   BADGES & PILLS
   ========================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--gold-accent);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--crimson-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: rgba(0, 210, 255, 0.15);
    color: var(--primary-blue);
    border: 1px solid rgba(0, 210, 255, 0.3);
}

.badge-purple {
    background: rgba(168, 85, 247, 0.15);
    color: var(--neon-purple);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* ==========================================================
   FORMS & INPUTS
   ========================================================== */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.form-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.15);
}

.form-input::placeholder {
    color: var(--text-dim);
}

.form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-helper {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.4rem;
}

.form-error {
    font-size: 0.8rem;
    color: var(--crimson-red);
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    background: rgba(3, 6, 15, 0.9);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    font-size: 0.9rem;
    margin-top: 1rem;
    max-width: 340px;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.825rem;
    color: var(--text-dim);
}

.disclaimer-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.5;
}
