:root {
    --primary: #00d4aa;
    --secondary: #7c3aed;
    --dark: #0a0f1e;
    --dark-lighter: #1e293b;
    --text-white: #ffffff;
    --text-gray: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    background: rgba(10, 15, 30, 0.8);
    backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-btns {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #00b894);
    color: var(--dark);
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 212, 170, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 180px 5% 100px;
    background: radial-gradient(circle at top right, rgba(124, 58, 237, 0.1), transparent),
                radial-gradient(circle at bottom left, rgba(0, 212, 170, 0.1), transparent);
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
}

/* Market Section */
.market-section {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-gray);
}

.market-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.market-tabs {
    display: flex;
    background: var(--dark-lighter);
    padding: 0.5rem;
    border-radius: 15px;
    gap: 0.5rem;
}

.tab-btn {
    padding: 0.8rem 2.5rem;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-gray);
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--dark);
}

.btn-create {
    background: rgba(124, 58, 237, 0.1);
    color: var(--secondary);
    border: 1px solid var(--secondary);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn-create:hover {
    background: var(--secondary);
    color: white;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 1.5rem;
    background: var(--glass-bg);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
}

.filter-group {
    flex: 1;
}

.filter-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    background: var(--dark);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
}

/* Market Table */
.market-table-container {
    background: var(--glass-bg);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.market-table {
    width: 100%;
    border-collapse: collapse;
}

.market-table th {
    text-align: right;
    padding: 1.5rem;
    background: rgba(255,255,255,0.02);
    color: var(--text-gray);
    font-weight: 600;
}

.market-table td {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.advertiser {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

.price span {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-stc { background: rgba(88, 45, 129, 0.2); color: #8a2be2; }
.badge-urpay { background: rgba(253, 195, 0, 0.2); color: #fdc300; }
.badge-mada { background: rgba(26, 77, 161, 0.2); color: #1a4da1; }
.badge-apple { background: rgba(255, 255, 255, 0.1); color: white; }
.badge-bank { background: rgba(16, 185, 129, 0.2); color: #10b981; }

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 3rem 2rem;
    border-radius: 30px;
    text-align: center;
    transition: 0.3s;
}

.feature-card.glass:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--dark-lighter);
    width: 100%;
    max-width: 500px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    animation: fadeIn 0.4s ease;
}

.modal-header {
    padding: 1.5rem 2rem;
    background: rgba(255,255,255,0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 2rem;
}

.input-wrapper {
    position: relative;
    margin-top: 0.5rem;
}

.currency-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-weight: 700;
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: rgba(255,255,255,0.02);
    display: flex;
    gap: 1rem;
}

/* Chat window */
.chat-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 350px;
    background: var(--dark-lighter);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 3000;
    display: none;
    flex-direction: column;
}

.chat-header {
    background: var(--secondary);
    padding: 1rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
}

.chat-body {
    height: 300px;
    padding: 1rem;
    overflow-y: auto;
}

.msg {
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 15px;
    max-width: 80%;
    font-size: 0.9rem;
}

.msg-received { background: var(--glass-bg); align-self: flex-start; }
.msg-sent { background: var(--secondary); align-self: flex-end; margin-right: auto; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-container { flex-direction: column; text-align: center; }
    .hero-content h1 { font-size: 2.5rem; }
    .market-controls { flex-direction: column; gap: 1rem; }
}
