:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #121218;
    --bg-card: #1a1a24;
    --bg-hover: #252530;
    --accent: #ff6b35;
    --accent-hover: #ff8555;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --success: #22c55e;
    --border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

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

.logo-emoji {
    font-size: 1.75rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.btn-primary.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-secondary);
}

.btn-text {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-text:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8rem 4rem 4rem;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.badge {
    display: inline-block;
    background: rgba(255, 107, 53, 0.15);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.badge.secondary {
    background: rgba(160, 160, 176, 0.15);
    color: var(--text-secondary);
}

.badge.success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-preview {
    position: relative;
    width: 400px;
    height: 400px;
}

.agent-card {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 220px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;
}

.agent-card.card-1 {
    top: 0;
    left: 0;
    z-index: 3;
}

.agent-card.card-2 {
    top: 80px;
    left: 60px;
    z-index: 2;
    animation-delay: -2s;
    opacity: 0.7;
}

.agent-card.card-3 {
    top: 160px;
    left: 120px;
    z-index: 1;
    animation-delay: -4s;
    opacity: 0.5;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.agent-avatar {
    font-size: 3rem;
}

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

.agent-id {
    font-weight: 600;
    color: var(--text-primary);
}

.agent-role {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Sections */
section {
    padding: 6rem 4rem;
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* About Section */
.about-section {
    background: var(--bg-secondary);
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.agent-type {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
}

.agent-type:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.type-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.agent-type h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.agent-type p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* Challenge Section */
.challenge-section {
    background: var(--bg-primary);
}

.challenge-container {
    display: flex;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.puzzle-area {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
}

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

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

.puzzle-stat .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.puzzle-stat .value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: monospace;
}

/* Puzzle Container */
#puzzle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

#puzzle-container .sliding-puzzle {
    background: var(--bg-primary) !important;
    border: 2px solid var(--border) !important;
    border-radius: 8px;
    padding: 8px;
}

#puzzle-container .puzzle-tile {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover)) !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;
    color: white !important;
    transition: all 0.2s !important;
}

#puzzle-container .puzzle-tile:hover {
    transform: scale(0.95) !important;
}

#puzzle-container .puzzle-empty {
    background: var(--bg-secondary) !important;
    border-radius: 6px !important;
}

.puzzle-hint {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Challenge Sidebar */
.challenge-sidebar {
    flex: 0 0 300px;
}

.winners-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
}

.winners-list h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.winner-slots {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.winner-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 0.875rem;
}

.winner-slot .rank {
    color: var(--accent);
    font-weight: 700;
    min-width: 30px;
}

.winner-slot .address {
    color: var(--text-muted);
    font-family: monospace;
}

.winner-slot.filled .address {
    color: var(--success);
}

/* Mint Section */
.mint-section {
    background: var(--bg-secondary);
    position: relative;
    min-height: 600px;
}

.mint-section.locked {
    overflow: hidden;
}

.mint-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lock-content {
    text-align: center;
}

.lock-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.lock-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

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

.mint-content {
    max-width: 600px;
    margin: 0 auto;
}

.mint-content.hidden {
    display: none;
}

.mint-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
}

.nft-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.nft-visual {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.nft-details h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.nft-traits {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.trait {
    background: var(--bg-secondary);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.mint-action {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
}

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

.price-tag .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mint-status {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    padding: 3rem 4rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-copy {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 400px;
    text-align: center;
    position: relative;
}

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

.modal-close:hover {
    color: var(--text-primary);
}

.modal-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.modal-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        padding: 6rem 2rem 3rem;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .agent-preview {
        transform: scale(0.8);
    }
    
    .challenge-container {
        flex-direction: column;
    }
    
    .agents-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .agents-grid {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 4rem 1.5rem;
    }
    
    .nft-display {
        flex-direction: column;
        text-align: center;
    }
}
