ChessNut/public/styles/style.css
2025-11-22 16:14:15 +01:00

132 lines
6 KiB
CSS

/* Compiled CSS (from style.scss) - included directly so no build step is required */
*{box-sizing:border-box}
html,body{height:100%}
body{
font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
margin:0;padding:24px;background: linear-gradient(180deg,#f7fafc 0%, #eef2f7 60%);color:#0b1220;
}
.page{max-width:1100px;margin:0 auto}
header h2{margin:0 0 12px 0;color:#0b1220}
.card{background: linear-gradient(180deg, #ffffff, #fbfdff);border:1px solid rgba(11,18,32,0.06);padding:16px;border-radius:10px;box-shadow:0 6px 18px rgba(11,18,32,0.06);}
button{background:#2563eb;color:white;border:none;padding:8px 12px;border-radius:8px;cursor:pointer;font-weight:600}
button[disabled]{opacity:0.6;cursor:not-allowed}
input[type="text"], input[type="search"]{padding:8px;border-radius:8px;border:1px solid rgba(11,18,32,0.06);background:transparent;color:inherit}
a{color:#2563eb;text-decoration:none}
a:hover{text-decoration:underline}
#log{white-space:pre-wrap;border-radius:8px;background:#f3f6f9;padding:8px;height:280px;overflow:auto;color:#0b1220}
#board{width:800px;height:800px;display:grid;grid-template-columns:repeat(8,1fr);border-radius:6px;overflow:hidden;background-size:cover}
@media (max-width:900px){
#board{width:min(92vw,680px);height:min(92vw,680px)}
}
.muted{opacity:0.9;color:#475569}
.controls{display:flex;gap:8px;align-items:center}
#players{margin:6px 0;padding-left:18px}
/* invite button - dark text for light theme */
#copyInviteBtn{background:transparent;border:1px solid rgba(11,18,32,0.06);color:#0b1220;padding:6px 10px;border-radius:8px}
#youAreHost{background:rgba(255,255,255,0.04);padding:6px 8px;border-radius:6px;margin-left:6px}
/* layout helpers used from game.html */
.layout-row{display:flex;gap:20px;align-items:flex-start}
/* turn banner */
/* turn banner - light theme */
#turnBanner{color:#07203a;background:#c7f9d9;padding:8px 12px;border-radius:8px;font-weight:700;display:none}
#turnBanner.show{display:inline-block}
/* board tweaks */
#board{border:1px solid rgba(11,18,32,0.06);position:relative;background-image: url('/assets/chess-pieces/boards/8x8_wood.svg');background-size:cover}
/* square cells and piece images (used by renderFen) */
.square{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
.square img, .piece{max-width:78%;max-height:78%;user-select:none}
/* marker shown on target squares for legal moves */
.square{position:relative}
.square .move-marker{
position:absolute;
left:50%;top:50%;transform:translate(-50%,-50%);
width:18%;height:18%;border-radius:50%;pointer-events:auto;cursor:pointer;background:rgba(37,99,235,0.95);
box-shadow:0 2px 6px rgba(11,18,32,0.06);z-index:3;transition:transform 120ms ease, opacity 120ms ease;
}
.square .move-marker:hover{ transform:translate(-50%,-50%) scale(1.12); opacity:0.95 }
/* highlighted/selected square when a player selects a piece */
.square.selected{
outline: 3px solid rgba(245,158,11,0.95); /* amber */
box-shadow: inset 0 0 0 3px rgba(245,158,11,0.06), 0 8px 20px rgba(11,18,32,0.04);
z-index: 4;
}
.square.selected .piece{transform: scale(1.04); transition: transform 140ms ease}
/* hide the visual selection outline for a square while keeping the piece visible */
.square.hide-selection.selected,
.square.hide-selection.selected-remote{
outline: none !important;
box-shadow: none !important;
}
.square.hide-selection{transition:background 120ms ease}
/* remote selection (other player's selection) */
.square.selected-remote{
outline: 3px solid rgba(37,99,235,0.95); /* blue */
box-shadow: inset 0 0 0 3px rgba(37,99,235,0.06), 0 6px 16px rgba(11,18,32,0.04);
z-index: 3;
}
.square.selected-remote .piece{transform: scale(1.02); transition: transform 140ms ease}
/* basic checkerboard coloring */
.square.light{background: linear-gradient(180deg, #f8fafc, #f1f5f9);}
.quare.dark{background: linear-gradient(180deg, #e6eef8, #dbe9f5);}
.square.dark{background: linear-gradient(180deg, #e6eef8, #dbe9f5);}
.square{border:1px solid rgba(0,0,0,0.06)}
/* flipped board for black perspective */
#board.flipped{transform:rotate(180deg)}
#board.flipped .square img{transform:rotate(180deg)}
/* Lobby / hero styles - decorative and fun */
.hero{
display:flex;align-items:center;justify-content:space-between;padding:28px;border-radius:12px;margin-bottom:18px;overflow:hidden;position:relative;border:1px solid rgba(11,18,32,0.04);
background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(99,102,241,0.03));
}
.hero .title{font-size:28px;font-weight:800;letter-spacing:-0.5px}
.hero .subtitle{color:rgba(11,18,32,0.65);margin-top:6px;font-weight:500}
.hero .decor{position:absolute;right:-80px;top:-60px;opacity:0.06;width:420px;height:420px;filter:blur(6px);transform:rotate(20deg)}
.card.lobby{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:14px}
/* buttons variants */
.btn-ghost{background:transparent;border:1px solid rgba(11,18,32,0.06);padding:8px 10px;border-radius:8px;color:inherit}
.btn-cta{background:linear-gradient(90deg,#3b82f6,#60a5fa);box-shadow:0 8px 20px rgba(59,130,246,0.18)}
/* floating small piece icons */
.floating-piece{position:absolute;opacity:0.06;width:160px;height:160px;pointer-events:none;transform:translate(-10%,-10%);}
/* subtle button hover */
button:hover{transform:translateY(-3px);transition:all 180ms ease}
/* players area */
.players-list{list-style:none;padding-left:0;margin:0;display:flex;gap:10px}
.players-list li{background:rgba(11,18,32,0.03);padding:6px 10px;border-radius:8px}
/* card hand UI */
.player-hand{border:1px solid rgba(11,18,32,0.06);padding:8px;border-radius:8px;background:#fff}
.card-item{display:flex;gap:8px;align-items:flex-start;background:#f8fafc;padding:8px;border-radius:8px;border:1px solid rgba(11,18,32,0.04)}
.card-art{width:64px;height:48px;background:linear-gradient(180deg,#eef2ff,#ffffff);display:flex;align-items:center;justify-content:center;color:#475569;border-radius:6px;font-size:12px}
.card-meta{display:flex;flex-direction:column}
.card-title{font-weight:700;color:#0b1220}
.card-desc{color:#475569;font-size:13px}