/* === CSS Variables === */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;
    --border-color: #2a2a3a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;
    --accent-gold: #f0b90b;
    --accent-gold-dark: #c9960a;
    --accent-green: #00d395;
    --accent-green-dark: #00a876;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-red: #ef4444;
    --gradient-gold: linear-gradient(135deg, #f0b90b 0%, #e6a800 100%);
    --gradient-green: linear-gradient(135deg, #00d395 0%, #00a876 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

input, button {
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* === Gradient Text === */
.gradient-text {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 48px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-gold);
    color: #000;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(240, 185, 11, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--accent-gold);
    background: var(--bg-card-hover);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--accent-red);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    color: var(--accent-red);
    border-color: var(--accent-red);
}

.full-width {
    width: 100%;
}

/* === Header === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-gold);
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-badge {
    padding: 4px 8px;
    background: rgba(240, 185, 11, 0.15);
    border: 1px solid rgba(240, 185, 11, 0.3);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-gold);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.network-badge {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-green);
}

.network-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.wallet-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--gradient-gold);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallet-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(240, 185, 11, 0.3);
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === Mobile Menu === */
.mobile-menu {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-link {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--accent-gold);
    background: var(--bg-card-hover);
}

/* === Main Content === */
.main {
    padding-top: 73px;
}

/* === Hero Section === */
.hero {
    position: relative;
    padding: 60px 20px 40px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-gold);
    top: -150px;
    right: -100px;
}

.glow-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-purple);
    bottom: -100px;
    left: -50px;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(240, 185, 11, 0.1);
    border: 1px solid rgba(240, 185, 11, 0.2);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-gold);
    margin-bottom: 24px;
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-title {
    font-size: clamp(32px, 8vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* === User Card === */
.user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-gold);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    color: #000;
}

.user-details {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-address {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-active-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-green);
}

/* === Stats Section === */
.stats-section {
    padding: 0 20px 40px;
}

.stats-grid {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(240, 185, 11, 0.1);
    border-radius: var(--radius-md);
    color: var(--accent-gold);
}

.stat-icon-green {
    background: rgba(0, 211, 149, 0.1);
    color: var(--accent-green);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* === Action Sections === */
.action-section {
    padding: 0 20px 40px;
}

.section-header {
    max-width: 600px;
    margin: 0 auto 24px;
    text-align: center;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.action-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

/* === Input Groups === */
.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

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

.input-field {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-field:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.1);
}

.input-suffix {
    position: absolute;
    right: 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.hint-icon {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
}

/* === Price Display === */
.price-display {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.price-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.price-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-gold);
}

.price-breakdown {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

/* === Availability Status === */
.availability-status {
    margin-bottom: 20px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
}

.status-available {
    background: rgba(0, 211, 149, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(0, 211, 149, 0.3);
}

.status-taken {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-pending {
    background: rgba(240, 185, 11, 0.1);
    color: var(--accent-gold);
    border: 1px solid rgba(240, 185, 11, 0.3);
}

/* === Cooldown Display === */
.cooldown-display {
    padding: 16px;
    background: rgba(240, 185, 11, 0.1);
    border: 1px solid rgba(240, 185, 11, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.cooldown-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent-gold);
}

.cooldown-text {
    display: flex;
    flex-direction: column;
}

.cooldown-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.cooldown-timer {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* === Action Buttons === */
.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: 140px;
}

/* === Action Note === */
.action-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
}

.action-note svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

/* === Approval Info === */
.approval-info {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.approval-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.approval-row:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.approval-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.approval-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.approval-status {
    margin-bottom: 20px;
}

/* === Pricing Section === */
.pricing-section {
    padding: 0 20px 40px;
}

.pricing-grid {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.pricing-card {
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    border-color: rgba(240, 185, 11, 0.3);
    transform: translateY(-2px);
}

.pricing-length {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 27px;
    font-weight: 700;
    color: var(--accent-gold);
}

.pricing-note {
    max-width: 600px;
    margin: 20px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

/* === Info Section === */
.info-section {
    padding: 0 20px 60px;
}

.info-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.info-header {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.info-title {
    font-size: 16px;
    font-weight: 600;
}

.info-content {
    padding: 8px 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

.info-row:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.info-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.info-address {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-address span {
    font-size: 12px;
    font-family: monospace;
    color: var(--accent-gold);
}

.btn-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* === Toast Notifications === */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 40px);
    max-width: 400px;
}

.toast {
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.toast-success {
    border-color: rgba(0, 211, 149, 0.3);
    background: rgba(0, 211, 149, 0.1);
}

.toast-error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

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

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.modal {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
}

.tx-status {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.tx-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.tx-status-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.tx-hash {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.tx-hash-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.tx-hash-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-family: monospace;
    color: var(--accent-blue);
}

.tx-hash-link:hover {
    text-decoration: underline;
}

/* === Responsive === */
@media (max-width: 480px) {
    .hero {
        padding: 40px 16px 32px;
    }

    .hero-title {
        font-size: 28px;
    }

    .stats-section,
    .action-section,
    .pricing-section,
    .info-section {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .action-card {
        padding: 20px 16px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        min-width: auto;
    }

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

    .wallet-btn span:last-child {
        display: none;
    }
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }

    .network-badge {
        display: flex;
    }

    .hero {
        padding: 80px 20px 60px;
    }

    .hero-title {
        font-size: 48px;
    }

    .stats-section {
        padding-bottom: 60px;
    }

    .action-section,
    .pricing-section,
    .info-section {
        padding-bottom: 60px;
    }

    .pricing-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .header-container {
        padding: 16px 40px;
    }

    .hero {
        padding: 100px 40px 80px;
    }

    .stats-section,
    .action-section,
    .pricing-section,
    .info-section {
        padding-left: 40px;
        padding-right: 40px;
    }
}
