/* style.css */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --accent: #06d6a0;
    --dark: #121826;
    --dark-light: #1e293b;
    --light: #f8fafc;
    --gradient: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    --gradient-hover: linear-gradient(135deg, #3a56d4 0%, #6508a5 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Cryptocurrency Ticker */
.crypto-ticker {
    background: var(--gradient);
    background: -webkit-linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    padding: 12px 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(67, 97, 238, 0.3);
    z-index: 1000;
}

.ticker-wrapper {
    display: flex;
    animation: ticker 60s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    margin: 0 40px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 180px;
}

.ticker-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: var(--dark);
}

.ticker-symbol {
    font-weight: 600;
    margin-right: 8px;
}

.ticker-price {
    font-weight: 700;
    margin-right: 5px;
}

.ticker-change {
    font-size: 0.85em;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.ticker-change.positive {
    background: rgba(6, 214, 160, 0.2);
    color: var(--accent);
}

.ticker-change.negative {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Hero Section */
.hero-section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(67, 97, 238, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(114, 9, 183, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient);
    background: -webkit-linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    -webkit-background-clip: text;
    -moz-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-image {
    max-width: 80%;
    height: auto;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    background: -webkit-linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    -webkit-background-clip: text;
    -moz-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-text-fill-color: transparent;
    color: transparent;
}

.stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Web3 Connection Box */
.web3-box {
    background: rgba(30, 41, 59, 0.6);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 2rem;
}

.web3-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(67, 97, 238, 0.3);
}

.wallet-address {
    display: none;
    background: rgba(67, 97, 238, 0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(67, 97, 238, 0.3);
    margin-top: 1rem;
    font-family: monospace;
    word-break: break-all;
}

.wallet-info {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(6, 214, 160, 0.1);
    border-radius: var(--border-radius);
    border: 1px solid rgba(6, 214, 160, 0.2);
}

/* Issues Grid */
.issues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.issue-card {
    background: rgba(30, 41, 59, 0.6);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

.issue-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.issue-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    background: -webkit-linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 24px;
    color: white;
}

.issue-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.issue-desc {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
}

.issue-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(6, 214, 160, 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.8rem;
}

/* Buttons */
.btn-primary {
    background: var(--gradient);
    background: -webkit-linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--gradient-hover);
    background: -webkit-linear-gradient(135deg, #3a56d4 0%, #6508a5 100%);
    background: linear-gradient(135deg, #3a56d4 0%, #6508a5 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: rgba(18, 24, 38, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .issues-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .ticker-item {
        min-width: 150px;
        margin: 0 25px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .web3-box {
        padding: 1.5rem;
    }
    
    .ticker-item {
        min-width: 140px;
        margin: 0 20px;
        padding: 6px 12px;
    }
    
    .ticker-icon {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .ticker-symbol, .ticker-price {
        font-size: 0.9rem;
    }
    
    .ticker-change {
        font-size: 0.75rem;
    }
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
    .ticker-item,
    .web3-box,
    .issue-card,
    .footer {
        background: rgba(30, 41, 59, 0.95);
    }
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.floating {
    animation: float 5s ease-in-out infinite;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(67, 97, 238, 0); }
    100% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0); }
}

/* Custom Select */
.chain-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-family: 'Inter', sans-serif;
    margin-top: 1rem;
}

.chain-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* Better Safari Support for Gradients */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    .hero-title, .stat-number {
        background: -webkit-linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .btn-primary {
        background: -webkit-linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    }
    
    .btn-primary:hover {
        background: -webkit-linear-gradient(135deg, #3a56d4 0%, #6508a5 100%);
    }
    
    .issue-icon {
        background: -webkit-linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    }
    
    .crypto-ticker {
        background: -webkit-linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    }
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* Improved focus states for accessibility */
.btn-primary:focus,
.btn-outline:focus,
.issue-card:focus,
.chain-select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Performance optimizations */
.issue-card,
.web3-box {
    will-change: transform;
}

/* Better touch targets for mobile */
@media (max-width: 768px) {
    .btn-primary,
    .btn-outline {
        padding: 14px 28px;
        min-height: 48px;
    }
    
    .issue-card {
        padding: 1.25rem;
    }
}

/* Visually hidden for accessibility */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Gradient Text Compatibility */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -moz-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-text-fill-color: transparent;
    color: transparent;
}