/* ShotDrop styles (student + host). Shares the GRA6140 look. */
:root { --blue: #2c5f8a; --red: #c0392b; --ink: #1c2430; --mut: #5b6774; --bg: #f4f6f8; --good: #0ca30c; --line: #c8d0d8; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px 14px 60px; }
.wrap.wide { max-width: 1240px; }
h1 { font-size: 1.25rem; margin: 8px 0 2px; }
h2 { font-size: 1.02rem; margin: 16px 0 8px; }
.sub { color: var(--mut); font-size: .85rem; margin-bottom: 14px; }
.card { background: #fff; border-radius: 10px; padding: 14px 16px; margin: 10px 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.hint { font-size: .79rem; color: var(--mut); margin: 3px 0 5px; line-height: 1.4; }
.linkbtn { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }
.danger-text { color: var(--red); }
.err { color: var(--red); font-size: .9rem; min-height: 1.2em; }
.ok { color: var(--good); font-size: .9rem; }
.hidden { display: none !important; }
button, .btn { font: inherit; border: 0; border-radius: 8px; padding: 10px 18px; cursor: pointer; background: #e6ebf0; color: inherit; text-decoration: none; display: inline-block; }
button:disabled { opacity: .5; cursor: default; }
.primary { background: var(--blue); color: #fff; font-weight: 600; }
.danger { background: var(--red); color: #fff; font-weight: 600; }
.ghost { background: #eef1f4; }
input[type=text], input[type=password], textarea { width: 100%; padding: 10px; font-size: 1rem; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; background: #fff; }
textarea { resize: vertical; }
label { font-weight: 600; font-size: .9rem; display: block; margin: 10px 0 6px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 0; }
.pill { display: inline-block; background: #eef1f4; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .85rem; }
.pill.open { background: #e9f7e9; border-color: #a9d8a9; color: var(--good); }
.pill.closed { background: #f2f2f2; color: var(--mut); }
.spinner { display: inline-block; width: 26px; height: 26px; border: 3px solid #cdd6de; border-top-color: var(--blue); border-radius: 50%; animation: spin 1s linear infinite; }
.spinner.small { width: 18px; height: 18px; border-width: 2px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.waitbox { text-align: center; padding: 34px 10px; color: var(--mut); }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; align-items: center; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* student */
.prompt { font-size: 1.02rem; margin-bottom: 10px; white-space: pre-line; }
.closed { background: #fff4e5; border: 1px solid #f3d7a8; color: #8a5a00; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.dropzone { border: 2px dashed var(--line); border-radius: 12px; padding: 34px 16px; text-align: center; cursor: pointer; background: #fafbfc; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus, .dropzone.over { border-color: var(--blue); background: #eef4fa; outline: none; }
.dropzone.disabled { opacity: .45; cursor: not-allowed; }
.dz-icon { font-size: 2.2rem; }
.dz-text { margin-top: 6px; }
.mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.thumb { border: 1px solid var(--line); border-radius: 9px; padding: 8px; background: #fff; }
.thumb img { width: 100%; height: 130px; object-fit: contain; background: #f0f2f4; border-radius: 6px; cursor: zoom-in; }
.thumb .cap { margin-top: 6px; font-size: .88rem; padding: 7px 9px; }
.thumb .row { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }

/* viewer (student) */
.viewer { position: fixed; inset: 0; background: rgba(13,17,23,.94); z-index: 50; display: flex; align-items: center; justify-content: center; }
.viewer img { max-width: 96vw; max-height: 94vh; object-fit: contain; }
.viewer button { position: absolute; top: 14px; right: 14px; background: #fff; }

/* host */
.joinrow { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
@media (max-width: 760px) { .joinrow { grid-template-columns: 1fr; } }
.shorturl { font-size: 1.5rem; font-weight: 700; color: var(--blue); word-break: break-all; }
.statebox { min-width: 240px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 10px; }
.gitem { border: 1px solid var(--line); border-radius: 9px; padding: 8px; background: #fff; transition: box-shadow .4s; }
.gitem.new { box-shadow: 0 0 0 3px #a9d8a9; }
.gitem img { width: 100%; height: 150px; object-fit: contain; background: #f0f2f4; border-radius: 6px; cursor: zoom-in; }
.gmeta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: .82rem; }
.galias { font-weight: 700; color: var(--mut); }
.noalias .galias { visibility: hidden; }
.gcap { font-size: .86rem; margin-top: 3px; }

/* presenter */
.present { position: fixed; inset: 0; background: #0d1117; color: #e6edf3; z-index: 100; display: flex; flex-direction: column; }
.stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 12px; }
.stage img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: pointer; }
.stage-empty { color: #8b949e; font-size: 1.6rem; }
.joincard { text-align: center; background: #fff; color: var(--ink); padding: 32px 40px; border-radius: 16px; }
.joincard #qr-big { display: inline-block; }
.joinurl { font-size: 2.4rem; font-weight: 800; color: var(--blue); margin-top: 18px; }
.navbar { display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: #161b22; font-size: 1rem; }
.navbar #stage-meta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbar button { background: #30363d; color: #e6edf3; padding: 6px 14px; }
