/* ============================================
   Fomo x402 - Bright & Colorful Style
   Like the screenshot - No Dark Theme!
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Bright Colors */
    --purple: #8b5cf6;
    --pink: #ec4899;
    --cyan: #06b6d4;
    --yellow: #fbbf24;
    --green: #10b981;
    --orange: #f97316;
    
    /* Background */
    --bg-main: #e8f5e3;
    --bg-card: #ffffff;
    
    /* Text */
    --text-dark: #1f2937;
    --text-gray: #6b7280;
}

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

body {
    background: linear-gradient(135deg, #e8f5e3 0%, #d4f1c5 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-dark);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

/* ============================================
   Container Layout
   ============================================ */

.main-flex-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .main-flex-container {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Panels
   ============================================ */

.left-panel,
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ============================================
   Header
   ============================================ */

header {
    text-align: center;
    margin-bottom: 24px;
}

header h1 {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-gray);
    font-weight: 600;
}

.twitter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1DA1F2 0%, #0c8bd9 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(29, 161, 242, 0.3);
}

.twitter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(29, 161, 242, 0.5);
    background: linear-gradient(135deg, #0c8bd9 0%, #0a7dc2 100%);
}

.twitter-btn svg {
    transition: transform 0.3s ease;
}

.twitter-btn:hover svg {
    transform: rotate(-5deg) scale(1.1);
}

/* ============================================
   Card Base Style
   ============================================ */

.wallet-section,
.mint-section,
.rules-section,
.jackpot-section,
.lottery-info-section,
.winners-section {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ============================================
   Wallet Section - Pink Gradient
   ============================================ */

.wallet-section {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
}

.btn-connect {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-connect:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.wallet-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
}

.info-label {
    font-size: 0.9rem;
    color: var(--text-gray);
    font-weight: 600;
}

.info-value {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
}

/* ============================================
   Mint Section - Blue Gradient
   ============================================ */

.mint-section {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.mint-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.mint-info-box {
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid var(--yellow);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.mint-rule {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
    font-family: 'Space Grotesk', monospace;
}

.mint-rule-sub {
    font-size: 1rem;
    color: var(--orange);
    font-weight: 600;
}

.message {
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.message-info {
    background: #dbeafe;
    color: #1e40af;
}

.message-success {
    background: #d1fae5;
    color: #065f46;
}

.message-error {
    background: #fee2e2;
    color: #991b1b;
}

/* ============================================
   Buttons
   ============================================ */

.btn-approve,
.btn-mint {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin-bottom: 14px;
}

.btn-approve {
    background: linear-gradient(135deg, var(--yellow) 0%, var(--orange) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.btn-approve:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

.btn-mint {
    background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-mint:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.btn-approve:disabled,
.btn-mint:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.mint-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-gray);
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
}

/* ============================================
   Rules Section - White
   ============================================ */

.rules-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.rule-item {
    padding: 14px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.rule-item:last-child {
    margin-bottom: 0;
}

.rule-item:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(4px);
}

.rule-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--purple);
    margin-bottom: 4px;
}

.rule-desc {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.4;
    font-family: 'Space Grotesk', monospace;
}

/* ============================================
   Jackpot Section - Yellow/Orange Gradient
   ============================================ */

.jackpot-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 24px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.2);
}

.jackpot-label {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.jackpot-amount {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-dark);
    font-family: 'Space Grotesk', monospace;
    letter-spacing: -1px;
}

/* ============================================
   Lottery Stats - Light Purple
   ============================================ */

.lottery-info-section {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border-radius: 24px;
    padding: 28px;
}

.lottery-info-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-align: center;
}

.info-section {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-section .info-row {
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-section .info-label {
    font-size: 0.9rem;
    color: var(--text-gray);
    font-weight: 600;
}

.info-section .info-value {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
}

/* Countdown - Yellow/Orange Gradient */
.countdown {
    background: linear-gradient(135deg, var(--yellow) 0%, var(--orange) 100%) !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 12px !important;
    font-weight: 900 !important;
    font-family: 'Space Grotesk', monospace !important;
    font-size: 1.1rem !important;
    letter-spacing: 2px !important;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.ticket-info {
    margin-top: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    text-align: center;
}

.ticket-info small {
    color: var(--purple);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Space Grotesk', monospace;
}

/* ============================================
   Winners Section - Light Green
   ============================================ */

.winners-section {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.winners-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-align: center;
}

.winners-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.winner-placeholder {
    color: var(--text-gray);
    font-size: 0.95rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.6);
    padding: 20px;
    border-radius: 12px;
    font-weight: 600;
}

.winner-address.fomo {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.winner-address.fomo:hover {
    background: white;
    border-color: var(--green);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.winner-address.fomo a {
    color: var(--green);
    text-decoration: none;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 8px;
}

.winner-address.fomo a:hover {
    color: var(--text-dark);
}

.win-amount {
    background: linear-gradient(135deg, var(--yellow) 0%, var(--orange) 100%);
    color: white;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 1rem;
    font-weight: 700;
    display: inline-block;
    font-family: 'Space Grotesk', monospace;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    header h1 {
        font-size: 2rem;
    }

    .jackpot-amount {
        font-size: 2rem;
    }

    .mint-stats {
        grid-template-columns: 1fr;
    }
    
    .left-panel,
    .right-panel {
        gap: 16px;
    }
    
    .wallet-section,
    .mint-section,
    .rules-section,
    .jackpot-section,
    .lottery-info-section,
    .winners-section {
        padding: 20px;
    }
}

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #e8f5e3;
}

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

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

::selection {
    background: var(--purple);
    color: white;
}
