/* ============================================================ Super Auto Pets: The Board Game — cozy tabletop theme. Deep felt table, cream cards with cocoa borders, chunky type. ============================================================ */ :root { --felt-900: #12351f; --felt-800: #1a4a2b; --felt-700: #226038; --wood: #5b3a1e; --wood-light: #7a5230; --cream: #fdf3dc; --cream-dark: #f3e3bd; --cocoa: #4a2c14; --ink: #33230f; --coral: #ff8a3d; --coral-dark: #e06a1b; --gold: #ffcf5c; --red: #d94a38; --teal: #2f9c8a; --font-display: 'Lilita One', system-ui, sans-serif; --font-body: 'Nunito', system-ui, sans-serif; --card-radius: 12px; } * { margin: 0; padding: 0; box-sizing: border-box; } html, body, #root { min-height: 100vh; } body { font-family: var(--font-body); color: var(--cream); background-color: var(--felt-900); background-image: radial-gradient(ellipse at 50% -20%, rgba(255, 255, 255, 0.09), transparent 60%), radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, 0.45), transparent 60%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"), linear-gradient(160deg, var(--felt-800), var(--felt-900) 70%); } h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; } .muted { color: rgba(253, 243, 220, 0.55); } .centered { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; } .hint { font-size: 0.9rem; color: rgba(253, 243, 220, 0.65); text-align: center; } .warn-text { color: var(--gold); font-weight: 700; } /* ---------- buttons ---------- */ .btn { font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.03em; color: var(--cream); background: var(--wood); border: 3px solid rgba(0, 0, 0, 0.25); border-radius: 12px; padding: 10px 18px; cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35); transition: transform 80ms ease, box-shadow 80ms ease, filter 120ms ease; } .btn:hover:not(:disabled) { filter: brightness(1.1); } .btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); } .btn:disabled { opacity: 0.4; cursor: not-allowed; } .btn-primary { background: linear-gradient(180deg, var(--coral), var(--coral-dark)); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); } .btn-secondary { background: linear-gradient(180deg, var(--teal), #227465); } .btn-ghost { background: transparent; border-color: rgba(253, 243, 220, 0.3); box-shadow: none; } .btn-big { font-size: 1.25rem; padding: 14px 28px; } .btn-sm { font-size: 0.8rem; padding: 4px 10px; border-width: 2px; } /* ---------- home ---------- */ .home { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; } .home-pets { font-size: 2.6rem; letter-spacing: 0.3em; animation: float 3s ease-in-out infinite; } @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } } .home-title { font-size: clamp(2.2rem, 6vw, 3.6rem); text-align: center; color: var(--gold); text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35); display: flex; flex-direction: column; line-height: 1.05; } .home-subtitle { font-size: 0.42em; color: var(--cream); letter-spacing: 0.25em; text-transform: uppercase; } .home-card { background: rgba(0, 0, 0, 0.25); border: 2px solid rgba(253, 243, 220, 0.15); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 16px; width: min(380px, 92vw); } .field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 0.9rem; } .field input, .code-input { font-family: var(--font-body); font-size: 1.1rem; font-weight: 700; color: var(--ink); background: var(--cream); border: 3px solid var(--cocoa); border-radius: 10px; padding: 10px 12px; outline: none; width: 100%; } .code-input { font-family: var(--font-display); letter-spacing: 0.35em; text-transform: uppercase; text-align: center; } .home-divider { text-align: center; font-size: 0.85rem; color: rgba(253, 243, 220, 0.5); display: flex; align-items: center; gap: 10px; } .home-divider::before, .home-divider::after { content: ''; flex: 1; height: 1px; background: rgba(253, 243, 220, 0.2); } .home-join { display: flex; gap: 10px; } .home-error { color: #ffb3a7; font-weight: 700; text-align: center; } /* ---------- topbar ---------- */ .table { min-height: 100vh; display: flex; flex-direction: column; } .topbar { display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: linear-gradient(180deg, var(--wood-light), var(--wood)); border-bottom: 4px solid rgba(0, 0, 0, 0.35); flex-wrap: wrap; } .topbar-brand { font-family: var(--font-display); font-size: 1.2rem; color: var(--gold); } .topbar-round { font-size: 0.95rem; } .topbar-players { display: flex; gap: 14px; flex: 1; flex-wrap: wrap; } .topbar-player { display: flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, 0.2); border-radius: 999px; padding: 4px 12px; font-size: 0.9rem; } .topbar-player.is-you { outline: 2px solid var(--gold); } .topbar-name { font-weight: 900; } .chip { font-size: 0.85rem; } .conn-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; } .conn-dot.on { background: #6fe08b; } .conn-dot.off { background: var(--red); } .topbar-code { font-family: var(--font-display); letter-spacing: 0.25em; background: rgba(0, 0, 0, 0.25); border: 2px dashed rgba(253, 243, 220, 0.4); border-radius: 8px; padding: 4px 10px; } .table-main { flex: 1; padding: 20px 16px 40px; max-width: 1100px; width: 100%; margin: 0 auto; } /* ---------- lobby ---------- */ .lobby { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; } .lobby-bounce { font-size: 3rem; animation: float 2s ease-in-out infinite; } .lobby-code { font-family: var(--font-display); font-size: 3rem; letter-spacing: 0.35em; color: var(--gold); background: rgba(0, 0, 0, 0.25); border: 3px dashed rgba(255, 207, 92, 0.5); border-radius: 16px; padding: 12px 28px 12px 40px; } /* ---------- cards ---------- */ .card { position: relative; width: 108px; height: 148px; background: linear-gradient(180deg, var(--cream), var(--cream-dark)); border: 3px solid var(--cocoa); border-radius: var(--card-radius); color: var(--ink); display: flex; flex-direction: column; align-items: center; padding: 6px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35); flex-shrink: 0; transition: transform 120ms ease, box-shadow 120ms ease; user-select: none; } .card-lg { width: 128px; height: 176px; } .card-sm { width: 84px; height: 116px; } .card.is-clickable { cursor: pointer; } .card.is-clickable:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 10px 16px rgba(0, 0, 0, 0.4); } .card.is-selected { outline: 4px solid var(--gold); transform: translateY(-6px); } .card.is-disabled { filter: saturate(0.6) brightness(0.85); } .card.is-dead { filter: grayscale(1); } .card-top { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; } .card-tier { font-weight: 900; color: rgba(51, 35, 15, 0.55); } .card-suit { font-size: 0.95rem; } .card-art { font-size: 3rem; line-height: 1.25; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.25)); } .card-lg .card-art { font-size: 3.6rem; } .card-sm .card-art { font-size: 2.2rem; } .card-name { font-family: var(--font-display); font-size: 0.85rem; margin-top: auto; } .card-bottom { display: flex; gap: 6px; align-items: center; margin-top: 2px; } .card-power { font-family: var(--font-display); background: radial-gradient(circle at 35% 30%, #ffb347, var(--coral-dark)); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); border: 2px solid rgba(0, 0, 0, 0.25); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; font-size: 0.95rem; } .card-power.is-buffed { background: radial-gradient(circle at 35% 30%, #7be495, #1f9e55); } .card-damage { font-family: var(--font-display); color: #fff; background: var(--red); border: 2px solid rgba(0, 0, 0, 0.25); border-radius: 8px; padding: 1px 6px; font-size: 0.8rem; } .card-food-text { font-size: 0.72rem; font-weight: 700; color: #7a2e1e; margin-top: 2px; } .card-food { background: linear-gradient(180deg, #ffe9e0, #ffd4c2); } .card-check { position: absolute; top: -10px; right: -10px; background: var(--gold); color: var(--ink); font-weight: 900; border: 2px solid var(--cocoa); border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; } .card-slot-empty { width: 128px; height: 176px; border: 3px dashed rgba(253, 243, 220, 0.25); border-radius: var(--card-radius); flex-shrink: 0; } /* ---------- shop ---------- */ .shop { display: flex; flex-direction: column; gap: 22px; } .shop-status { text-align: center; font-size: 1.15rem; font-weight: 900; min-height: 1.6em; } .status-hot { color: var(--gold); animation: pulse 1.6s ease-in-out infinite; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.65; } } .section-label { font-family: var(--font-display); font-size: 1rem; margin-bottom: 10px; color: rgba(253, 243, 220, 0.9); } .shop-row-wrap, .deck-wrap { background: rgba(0, 0, 0, 0.18); border: 2px solid rgba(253, 243, 220, 0.1); border-radius: 18px; padding: 14px 16px; } .shop-row, .deck-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; } .deck-empty { text-align: center; padding: 20px 0; } .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; } /* ---------- modal ---------- */ .modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: grid; place-items: center; z-index: 50; } .modal { background: linear-gradient(180deg, var(--felt-700), var(--felt-800)); border: 3px solid rgba(253, 243, 220, 0.25); border-radius: 20px; padding: 24px; text-align: center; display: flex; flex-direction: column; gap: 18px; max-width: 92vw; } .modal-cards { display: flex; gap: 18px; justify-content: center; } /* ---------- arrange ---------- */ .arrange { display: flex; flex-direction: column; gap: 18px; } .arrange-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; background: rgba(0, 0, 0, 0.18); border: 2px solid rgba(253, 243, 220, 0.1); border-radius: 18px; padding: 18px 16px; min-height: 220px; } .arrange-marker { font-family: var(--font-display); color: var(--gold); writing-mode: vertical-rl; transform: rotate(180deg); font-size: 0.9rem; opacity: 0.8; } .arrange-card { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: grab; } .arrange-card:active { cursor: grabbing; } .arrange-arrows { display: flex; gap: 4px; } /* ---------- battle ---------- */ .battle { display: flex; flex-direction: column; gap: 16px; } .battle-header { display: flex; justify-content: center; align-items: center; gap: 14px; } .battle-names { display: flex; justify-content: center; gap: 18px; font-weight: 900; } .battle-vs { font-family: var(--font-display); color: var(--gold); } .battlefield { display: flex; align-items: center; justify-content: center; gap: 8px; background: radial-gradient(ellipse at center, rgba(255, 207, 92, 0.07), transparent 65%), rgba(0, 0, 0, 0.2); border: 2px solid rgba(253, 243, 220, 0.1); border-radius: 18px; padding: 26px 12px; min-height: 240px; overflow-x: auto; } .battle-center { font-size: 1.6rem; opacity: 0.5; flex-shrink: 0; } .battle-side { display: flex; gap: 10px; flex: 1; min-width: 0; } /* Front units meet in the middle: left side is reversed so index 0 sits next to the center. */ .battle-side-left { flex-direction: row-reverse; } .battle-side-right { flex-direction: row; } .battle-unit { position: relative; flex-shrink: 0; } .battle-unit .card { width: 96px; height: 132px; } .battle-unit.is-front .card { outline: 3px solid rgba(255, 207, 92, 0.6); } @keyframes clash-left { 0% { transform: translateX(0); } 35% { transform: translateX(26px) rotate(4deg); } 60% { transform: translateX(-6px); } 100% { transform: translateX(0); } } @keyframes clash-right { 0% { transform: translateX(0); } 35% { transform: translateX(-26px) rotate(-4deg); } 60% { transform: translateX(6px); } 100% { transform: translateX(0); } } .battle-unit.clash-left { animation: clash-left 500ms ease; } .battle-unit.clash-right { animation: clash-right 500ms ease; } @keyframes dying { to { opacity: 0; transform: translateY(30px) rotate(12deg) scale(0.85); } } .battle-unit.unit-dying { animation: dying 700ms ease 500ms forwards; } @keyframes damage-pop { 0% { opacity: 0; transform: translate(-50%, 0) scale(0.6); } 25% { opacity: 1; transform: translate(-50%, -16px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -44px) scale(1); } } .damage-pop { position: absolute; top: 0; left: 50%; font-family: var(--font-display); font-size: 1.4rem; color: #ff6b52; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5); animation: damage-pop 1100ms ease 250ms forwards; opacity: 0; pointer-events: none; z-index: 5; } .battle-result { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; animation: result-in 400ms ease; } @keyframes result-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } } .battle-result-title { font-family: var(--font-display); font-size: 2.4rem; } .battle-result.is-win .battle-result-title { color: var(--gold); } .battle-result.is-loss .battle-result-title { color: #ff8f7a; } .battle-result.is-draw .battle-result-title { color: var(--teal); } .battle-result-sub { font-size: 1.1rem; font-weight: 700; } /* ---------- game over ---------- */ .gameover { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; } .gameover-emoji { font-size: 4rem; } .gameover-title { font-size: 3rem; color: var(--gold); text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35); } .gameover-scores { display: flex; flex-direction: column; gap: 8px; background: rgba(0, 0, 0, 0.22); border-radius: 16px; padding: 18px 26px; min-width: min(360px, 90vw); } .score-line { display: flex; justify-content: space-between; gap: 24px; font-size: 1.1rem; } .score-line.is-you .score-name { color: var(--gold); font-weight: 900; } /* ---------- toasts & banners ---------- */ .toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font-weight: 700; border-radius: 12px; padding: 10px 20px; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4); animation: result-in 200ms ease; z-index: 100; } .banner { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); border-radius: 10px; padding: 6px 16px; font-size: 0.9rem; font-weight: 700; z-index: 90; } .banner-warn { background: rgba(217, 74, 56, 0.9); } @media (max-width: 600px) { .card { width: 92px; height: 128px; } .card-lg { width: 104px; height: 146px; } .battle-unit .card { width: 78px; height: 110px; } }