/* Coinflip - PVP Solana Wagers */

:root {
    --primary: #14F195;
    --primary-dark: #00D97E;
    --secondary: #9945FF;
    --background: #0A0A0F;
    --surface: #14141F;
    --surface-light: #1E1E2E;
    --text: #FFFFFF;
    --text-muted: #A8A8B3;
    --success: #00D97E;
    --danger: #FF4757;
    --warning: #FFA502;
    --border: #2A2A3A;
    --shadow: rgba(20, 241, 149, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
    gap: 20px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Crossed Swords Icon - Real metallic look */
.swords-icon {
    display: inline-block;
    width: 48px;
    height: 48px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='blade' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%23E8E8E8'/%3E%3Cstop offset='50%25' style='stop-color:%23FFFFFF'/%3E%3Cstop offset='100%25' style='stop-color:%23C0C0C0'/%3E%3C/linearGradient%3E%3ClinearGradient id='handle' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%238B4513'/%3E%3Cstop offset='100%25' style='stop-color:%23654321'/%3E%3C/linearGradient%3E%3ClinearGradient id='guard' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%23FFD700'/%3E%3Cstop offset='100%25' style='stop-color:%23DAA520'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='rotate(-45 32 32)'%3E%3Crect x='30' y='8' width='4' height='36' fill='url(%23blade)' rx='1'/%3E%3Crect x='30' y='44' width='4' height='12' fill='url(%23handle)' rx='1'/%3E%3Crect x='24' y='42' width='16' height='4' fill='url(%23guard)' rx='2'/%3E%3C/g%3E%3Cg transform='rotate(45 32 32)'%3E%3Crect x='30' y='8' width='4' height='36' fill='url(%23blade)' rx='1'/%3E%3Crect x='30' y='44' width='4' height='12' fill='url(%23handle)' rx='1'/%3E%3Crect x='24' y='42' width='16' height='4' fill='url(%23guard)' rx='2'/%3E%3C/g%3E%3C/svg%3E") no-repeat center center;
    background-size: contain;
    flex-shrink: 0;
}

.tagline {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--background);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--shadow);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

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

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
}

.btn-large {
    padding: 16px 48px;
    font-size: 1.2rem;
    width: 100%;
}

/* Wagers Section */
.wagers-section {
    background: var(--surface);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
}

.wagers-section h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.wagers-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    max-height: 400px;
    overflow-y: auto;
}

.loading-wagers,
.no-wagers,
.error-message {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

.error-message {
    color: var(--danger);
}

.wager-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.wager-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--shadow);
}

.wager-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.wager-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.wager-side {
    font-size: 1.1rem;
    padding: 5px 12px;
    background: var(--surface);
    border-radius: 20px;
}

.wager-creator {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: monospace;
}

.btn-accept {
    padding: 12px 24px;
    font-size: 1rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--surface);
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

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

.modal-content h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
}

/* Step Sections */
.create-step {
    animation: fadeIn 0.3s ease;
}

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

.step-section {
    margin-bottom: 25px;
}

.step-section h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Side Selection */
.side-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.side-btn {
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 25px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.side-btn:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

.side-btn.selected {
    border-color: var(--primary);
    background: rgba(20, 241, 149, 0.1);
}

.side-emoji {
    font-size: 2.5rem;
}

.side-btn span:last-child {
    font-weight: 600;
    font-size: 1rem;
}

/* Amount Selection */
.amount-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.amount-btn {
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 15px 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.amount-btn.selected {
    border-color: var(--primary);
    background: rgba(20, 241, 149, 0.1);
}

.custom-amount {
    display: flex;
    gap: 10px;
}

.custom-amount input {
    flex: 1;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text);
    font-size: 1rem;
}

.custom-amount input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Wallet Input */
.wallet-input {
    width: 100%;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: monospace;
}

.wallet-input:focus {
    outline: none;
    border-color: var(--primary);
}

.wallet-input::placeholder {
    color: var(--text-muted);
}

/* Wager Summary */
.wager-summary {
    background: var(--surface-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.wager-summary h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.summary-row:last-of-type {
    border-bottom: none;
}

.summary-row.highlight {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.fee-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* Escrow Info */
.escrow-info {
    background: var(--surface-light);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
}

.escrow-info p {
    margin-bottom: 15px;
}

.escrow-info strong {
    color: var(--primary);
    font-size: 1.2rem;
}

.escrow-address-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.escrow-address-box code {
    flex: 1;
    font-size: 0.85rem;
    color: var(--primary);
    word-break: break-all;
}

.copy-btn {
    background: var(--primary);
    color: var(--background);
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

.qr-placeholder {
    padding: 20px;
    background: var(--surface);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Deposit Steps */
.deposit-steps {
    margin-bottom: 25px;
}

.deposit-steps p {
    padding: 8px 0;
    color: var(--text-muted);
}

.deposit-steps strong {
    color: var(--primary);
}

/* TX Input */
.tx-input-section {
    margin-bottom: 25px;
}

.tx-input-section label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.tx-input {
    width: 100%;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: monospace;
}

.tx-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Success Content */
.success-content {
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.success-content h2 {
    color: var(--success);
}

.wager-details {
    background: var(--surface-light);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.waiting-text {
    color: var(--warning);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Accept Wager Styles */
.wager-to-accept {
    background: var(--surface-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.accept-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.accept-row:last-child {
    border-bottom: none;
}

.accept-row .highlight {
    color: var(--primary);
    font-weight: 700;
}

.accept-row.total {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Game Result */
.result-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.result-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.result-title.win {
    color: var(--success);
}

.result-title.lose {
    color: var(--danger);
}

.result-details {
    background: var(--surface-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.fairness-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.fairness-note small {
    font-family: monospace;
    font-size: 0.8rem;
}

#gameResultContent {
    text-align: center;
}

/* Recent Games Section */
.recent-games-section {
    margin-top: 40px;
    padding: 30px;
    background: var(--surface);
    border-radius: 16px;
}

.recent-games-section h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.recent-games-list {
    margin-top: 20px;
}

.no-games,
.loading-games {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
}

.recent-game-card {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 10px;
}

.recent-game-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.game-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.game-result {
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.game-result.heads {
    background: rgba(20, 241, 149, 0.2);
    color: var(--primary);
}

.game-result.tails {
    background: rgba(153, 69, 255, 0.2);
    color: var(--secondary);
}

.game-amount {
    font-weight: 600;
    color: var(--text);
}

.game-winner {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.game-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.game-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.verify-link {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Blockhash display under each game */
.game-blockhash {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    margin-top: 5px;
}

.blockhash-label {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.blockhash-value {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--primary);
    background: var(--surface);
    padding: 4px 8px;
    border-radius: 4px;
}

/* On Chain Proof Button */
.btn-proof {
    display: block;
    margin: 20px auto 0;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--background);
    font-weight: 700;
    border: none;
}

.btn-proof:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(20, 241, 149, 0.3);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

/* Proof Modal */
.proof-modal .proof-content {
    max-width: 550px;
}

.proof-section {
    background: var(--surface-light);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.proof-section h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.proof-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    gap: 15px;
}

.proof-row span:first-child {
    color: var(--text-muted);
    white-space: nowrap;
}

.proof-row code {
    font-family: monospace;
    color: var(--primary);
    word-break: break-all;
    text-align: right;
}

.proof-row code.small {
    font-size: 0.75rem;
}

.result-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
}

.result-badge.heads {
    background: rgba(20, 241, 149, 0.2);
    color: var(--primary);
}

.result-badge.tails {
    background: rgba(153, 69, 255, 0.2);
    color: var(--secondary);
}

.verified {
    color: var(--success);
    font-weight: 700;
}

.failed {
    color: var(--danger);
    font-weight: 700;
}

.algorithm-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.verify-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: monospace;
    word-break: break-all;
}

/* Fairness Modal */
.fairness-content {
    max-width: 550px;
}

.fairness-section {
    margin-bottom: 20px;
}

.fairness-section h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.fairness-section p {
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.6;
}

.fairness-section ol,
.fairness-section ul {
    margin-left: 20px;
    color: var(--text-muted);
}

.fairness-section li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.fairness-section code {
    background: var(--surface-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--primary);
}

.highlight-box {
    background: var(--surface-light);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
}

.highlight-box h3 {
    color: var(--text) !important;
}

.emphasis {
    color: var(--primary) !important;
    font-weight: 600;
    margin-top: 15px !important;
}

/* Header Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 10px;
}

.user-menu {
    display: flex;
    align-items: center;
}

.btn-user {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 20px;
}

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

.tier-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--background);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Auth Modal */
.auth-modal-content {
    max-width: 400px;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Info tooltip for form labels - uses native browser title tooltip */
.info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    cursor: help;
    opacity: 0.5;
    transition: opacity 0.2s;
    vertical-align: middle;
}

.info-tooltip:hover {
    opacity: 1;
    background: rgba(20, 241, 149, 0.2);
    color: var(--primary);
}

.form-input {
    width: 100%;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    color: var(--text);
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-recovery {
    text-align: center;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-recovery a {
    color: var(--primary);
    text-decoration: none;
}

/* Profile Modal */
.profile-modal-content {
    max-width: 500px;
}

.profile-section {
    background: var(--surface-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.profile-section h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

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

.tier-value {
    color: var(--primary);
    font-weight: 700;
}

.tier-progress-bar {
    background: var(--surface);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin: 10px 0;
}

.tier-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.tier-progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

.referral-box {
    text-align: center;
}

.referral-code-edit {
    background: var(--surface);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.referral-code-edit label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.referral-code-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.referral-code-input-row .form-input {
    flex: 1;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.referral-link-display {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.referral-link-display a {
    color: var(--primary);
    text-decoration: none;
}

.referral-link-display a:hover {
    text-decoration: underline;
}

.referral-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.referral-stat {
    text-align: center;
}

.referral-rates-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.referral-rate-current {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 10px;
}

.referral-rate-current span {
    color: var(--primary);
    font-weight: 700;
}

.tier-rates-table {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tier-rates-table span {
    background: var(--surface);
    padding: 4px 8px;
    border-radius: 4px;
}

.logout-btn {
    width: 100%;
    margin-top: 10px;
}

/* How It Works */
.how-it-works {
    margin-top: 40px;
    padding: 40px;
    background: var(--surface);
    border-radius: 16px;
}

.how-it-works h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.step-card {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--background);
    margin: 0 auto 15px;
}

.step-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0 20px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
    color: var(--text-muted);
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        padding: 30px 0;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .wagers-section,
    .how-it-works {
        padding: 25px;
    }

    .modal-content {
        padding: 25px;
    }

    .wager-card {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .wager-info {
        flex-direction: column;
        gap: 10px;
    }

    .amount-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .escrow-address-box {
        flex-direction: column;
    }

    .escrow-address-box code {
        text-align: center;
    }
}

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

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

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

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