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

:root {
    --background: #09090b;
    --foreground: #fafafa;
    --muted: #a1a1aa;
    --muted-foreground: #71717a;
    --border: #27272a;
    --card: #09090b;
    --card-hover: #18181b;
    --primary: #fafafa;
    --primary-foreground: #18181b;
    --accent: #27272a;
    
    /* Aceternity style gradient */
    --gradient-glow: linear-gradient(90deg, #3b82f6, #8b5cf6, #d946ef, #8b5cf6, #3b82f6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Subtle Grid Background (Aceternity style) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, #000 40%, transparent 100%);
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 6rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 4rem;
}

.main-title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to bottom right, #ffffff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--muted);
    font-size: 1.125rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Views */
.view {
    width: 100%;
    display: flex;
    justify-content: center;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.view.hidden {
    opacity: 0;
    transform: scale(0.98);
    pointer-events: none;
    position: absolute;
}

/* Main Button (Aceternity Animated Border) */
.btn-primary {
    position: relative;
    padding: 1px;
    border-radius: 9999px;
    background: transparent;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.btn-primary:hover {
    transform: scale(1.02);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: var(--gradient-glow);
    background-size: 200% auto;
    animation: spin 10s linear infinite;
}

.btn-text {
    position: relative;
    display: block;
    background-color: var(--background);
    padding: 1rem 3rem;
    border-radius: 9999px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    letter-spacing: -0.01em;
    z-index: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Shadcn Clean Card */
.glass-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    box-shadow: 0 4px 24px -1px rgba(0,0,0,0.5);
}

.glass-card h2 {
    text-align: left;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Payment Toggle */
.payment-toggle {
    display: flex;
    background: var(--card-hover);
    border-radius: 8px;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.5rem;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background: var(--accent);
    color: var(--foreground);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Inputs */
.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: var(--foreground);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input:focus {
    border-color: var(--muted);
    box-shadow: 0 0 0 1px var(--muted);
}

.input-hint {
    color: var(--muted-foreground);
    font-size: 0.75rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.amount-wrapper {
    position: relative;
}

.currency-symbol {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 1rem;
}

.amount-wrapper input {
    padding-left: 2rem;
    font-weight: 600;
}

/* Crypto Instructions */
.crypto-instructions {
    background: var(--card-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.crypto-label {
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.wallet-address {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    color: var(--muted);
    background: var(--background);
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    word-break: break-all;
    text-align: center;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: opacity 0.2s ease;
}

.btn-submit:hover {
    opacity: 0.9;
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-cancel {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    color: var(--muted);
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    margin-top: 0.25rem;
    transition: color 0.2s ease;
}

.btn-cancel:hover {
    color: var(--foreground);
}

/* Leaderboard */
.leaderboard-section {
    margin-top: 5rem;
    width: 100%;
}

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

.tab {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.75rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--foreground);
}

.tab.active {
    color: var(--foreground);
    border-bottom-color: var(--foreground);
}

.board.hidden {
    display: none;
}

.ranking-list {
    list-style: none;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.ranking-item:hover {
    background: var(--card-hover);
    border-radius: 8px;
    border-bottom-color: transparent;
}

.rank {
    font-size: 1rem;
    font-weight: 600;
    color: var(--muted);
    width: 40px;
}

.rank.gold { color: #fbbf24; }
.rank.silver { color: #9ca3af; }
.rank.bronze { color: #b45309; }

.name {
    flex-grow: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

.amount {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--foreground);
    font-weight: 600;
    font-size: 0.875rem;
}
