/* Modern CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #F0B90B;
    --primary-light: #FCD535;
    --primary-dark: #D4A017;
    --bg: #0a0e27;
    --bg-card: #1a1f35;
    --bg-hover: #252b47;
    --text: #eaecef;
    --text-dim: #848e9c;
    --text-bright: #f8d12f;
    --border: rgba(255,255,255,0.08);
    --gradient-primary: linear-gradient(135deg, #F0B90B 0%, #FCD535 100%);
    --gradient-bg: linear-gradient(135deg, #0a0e27 0%, #1a1f35 100%);
    --glow: 0 0 40px rgba(240,185,11,0.3);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(240,185,11,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(252,213,53,0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 31, 53, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
}

.logo-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px var(--primary));
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

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

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s;
}

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

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

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-outline {
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #0a0e27;
    box-shadow: 0 4px 20px rgba(240,185,11,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(240,185,11,0.4);
}

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

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

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #0a0e27;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    padding: 140px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

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

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(240,185,11,0.5)); }
    50% { filter: drop-shadow(0 0 20px rgba(240,185,11,0.8)); }
}

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

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-dim);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    animation: fadeInRight 1s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.blockchain-visual {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 2rem;
}

.block {
    width: 70px;
    height: 70px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    position: relative;
    animation: float 3s ease-in-out infinite;
    transition: all 0.3s;
}

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

.block:nth-child(1) { animation-delay: 0s; }
.block:nth-child(2) { animation-delay: 0.4s; }
.block:nth-child(3) { animation-delay: 0.8s; }
.block:nth-child(4) { animation-delay: 1.2s; }

.block.active {
    background: var(--gradient-primary);
    border-color: var(--primary);
    box-shadow: var(--glow);
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-25px) rotate(180deg); }
}

/* Section Styles */
section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 4rem;
    font-weight: 800;
    letter-spacing: -1px;
}

/* Features Grid */
.features {
    background: var(--bg-card);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(26, 31, 53, 0.5);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card::before { opacity: 0; }
.feature-card:hover::before { opacity: 0.05; }

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--glow);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: bounce 2s infinite;
}

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

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-dim);
    line-height: 1.7;
}

/* API Section */
.api-section {
    background: var(--bg);
}

.endpoint-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.endpoint-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.endpoint-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(240,185,11,0.2);
    transform: translateX(5px);
}

.endpoint-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.method {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.method.get {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.method.post {
    background: rgba(240,185,11,0.15);
    color: var(--primary);
    border: 1px solid rgba(240,185,11,0.3);
}

.endpoint-path {
    font-family: 'Consolas', 'Courier New', monospace;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.endpoint-desc {
    color: var(--text-dim);
    margin: 1rem 0;
}

.code-block {
    background: rgba(0,0,0,0.4);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid rgba(255,255,255,0.05);
}

.code-block pre {
    color: #00ff88;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Demo Section */
.demo-section {
    background: var(--bg-card);
}

.demo-card {
    background: var(--bg);
    border-radius: 24px;
    padding: 3rem;
    border: 1px solid var(--border);
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.demo-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 1rem 2rem;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-weight: 600;
    font-size: 1rem;
}

.tab-btn.active,
.tab-btn:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

.input-field {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: 'Consolas', 'Courier New', monospace;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(240,185,11,0.1);
}

.result-box {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.result-box.hidden {
    display: none;
}

.result-box h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.result-box pre {
    color: var(--text);
    font-family: 'Consolas', 'Courier New', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
}

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

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

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-col p {
    color: var(--text-dim);
    line-height: 1.7;
}

.footer-col a {
    display: block;
    color: var(--text-dim);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
}

.footer-col a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .demo-card {
        padding: 2rem 1.5rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-card);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(240,185,11,0.5);
    pointer-events: none;
    animation: ripple 0.6s ease-out;
}
