:root {
    --bg-primary: #0b0c10;
    --bg-secondary: #1f2833;
    --text-primary: #ffffff;
    --text-secondary: #c5c6c7;
    --accent-glow: #66fcf1;
    --accent-primary: #45a29e;
    --card-bg: rgba(31, 40, 51, 0.6);
    --border-color: rgba(69, 162, 158, 0.3);
    --success: #2ecc71;
    --error: #e74c3c;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(102, 252, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(69, 162, 158, 0.08) 0%, transparent 50%);
}

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

/* Typography & Utilities */
h1, h2, h3, h4 {
    font-weight: 600;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-glow) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #208783 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(69, 162, 158, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(69, 162, 158, 0.5);
}

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

.ghost-btn {
    background: transparent;
    color: var(--accent-glow);
}

.ghost-btn:hover {
    background: rgba(102, 252, 241, 0.05);
}

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

.outline-btn:hover {
    color: white;
    border-color: white;
}

.full-width {
    width: 100%;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.5rem;
}

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

#wallet-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wallet-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--accent-glow);
    border: 1px solid rgba(102, 252, 241, 0.2);
}

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 0;
    position: relative;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    line-height: 1.6;
}

.glow-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: var(--accent-primary);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    animation: pulse 8s infinite alternate;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.15; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.25; }
}

/* Marketplace section */
.marketplace {
    margin-top: 4rem;
}

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

.section-header h3 {
    font-size: 1.8rem;
}

.filters {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background: var(--bg-secondary);
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.filter-btn:hover {
    color: white;
}

.filter-btn.active {
    background: var(--accent-primary);
    color: white;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-secondary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.product-image-container {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-type-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(11, 12, 16, 0.7);
    backdrop-filter: blur(4px);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-seller {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-family: monospace;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
}

.product-price {
    display: flex;
    flex-direction: column;
}

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

.price-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-glow);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 12, 16, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    position: relative;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.modal.hidden .modal-content {
    transform: translateY(20px);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: white;
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-glow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 350px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
