@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Rye&family=Sancreek&family=Special+Elite&display=swap');

:root {
  --ip-orange: #df792c;
  --ip-orange-dark: #854018;
  --ip-paper: #e0c79a;
  --ip-ink: #2a1a10;
  --ip-white: #f6ecdc;
  --ip-muted: #b8aa97;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #090604; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ip-white);
  background:
    linear-gradient(90deg, rgba(7,4,3,.88), rgba(7,4,3,.42) 54%, rgba(7,4,3,.72)),
    linear-gradient(0deg, rgba(7,4,3,.7), transparent 56%),
    #150c07 url('/assets/images/image-portal/portal-bg.jpg') center / cover fixed no-repeat;
  font-family: 'Oswald', sans-serif;
}
body::before {
  content: '';
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,.48)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.01) 0 1px, transparent 1px 5px);
  pointer-events: none;
}
a { color: inherit; }

/* Přihlašovací brána */
.image-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 72px 20px;
}
.image-back {
  position: fixed;
  top: 24px;
  left: 28px;
  padding: 9px 12px;
  color: #d9cab4;
  background: rgba(9,6,4,.72);
  border-bottom: 1px solid rgba(223,121,44,.52);
  font: 600 10px/1 'Oswald', sans-serif;
  letter-spacing: .14em;
  text-decoration: none;
  text-transform: uppercase;
}
.image-back:hover { color: #fff; }
.image-login-card {
  position: relative;
  width: min(520px, 100%);
  padding: 39px 48px 43px;
  overflow: hidden;
  text-align: center;
  background:
    repeating-linear-gradient(-9deg, rgba(90,49,20,.035) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 12% 0, rgba(255,245,211,.7), transparent 42%),
    var(--ip-paper);
  border: 1px solid #6f431f;
  box-shadow: 14px 18px 0 rgba(0,0,0,.28), 0 30px 90px rgba(0,0,0,.54), inset 0 0 0 7px rgba(94,56,26,.1);
  color: var(--ip-ink);
}
.image-login-card::before,
.image-login-card::after {
  content: '';
  position: absolute;
  width: 52px;
  height: 52px;
  border-color: rgba(116,61,22,.45);
  pointer-events: none;
}
.image-login-card::before { top: 13px; left: 13px; border-top: 2px solid; border-left: 2px solid; }
.image-login-card::after { right: 13px; bottom: 13px; border-right: 2px solid; border-bottom: 2px solid; }
.image-login-logo { width: 112px; height: 112px; object-fit: contain; filter: drop-shadow(0 4px 2px rgba(64,30,8,.24)); }
.image-kicker {
  margin: 0 0 12px;
  color: var(--ip-orange-dark);
  font: 700 10px/1.4 'Oswald', sans-serif;
  letter-spacing: .25em;
  text-transform: uppercase;
}
.image-login-card h1,
.portal-panel h1,
.portal-welcome h1 {
  margin: 0;
  color: #28170d;
  font: 400 clamp(35px, 5vw, 56px)/1 'Rye', serif;
  text-transform: uppercase;
}
.image-login-card h1 em,
.portal-panel h1 em,
.portal-welcome h1 em { color: var(--ip-orange); font-style: normal; }
.image-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 19px auto;
  color: var(--ip-orange-dark);
  font-size: 9px;
}
.image-rule::before, .image-rule::after { content: ''; height: 1px; flex: 1; background: rgba(113,59,24,.45); }
.image-login-copy {
  margin: 0 auto 24px;
  color: #58432f;
  font: 500 14px/1.65 'Special Elite', Georgia, serif;
}
.steam-login {
  min-height: 67px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 15px;
  color: #fff;
  background: linear-gradient(135deg, #282727, #111);
  border: 1px solid #100b07;
  border-bottom: 4px solid var(--ip-orange-dark);
  box-shadow: 4px 5px 0 rgba(65,35,14,.28);
  text-align: left;
  text-decoration: none;
  transition: transform .2s, background .2s;
}
.steam-login:hover { background: #3a261a; transform: translateY(-2px); }
.steam-login > i:first-child { color: #fff; font-size: 29px; }
.steam-login > i:last-child { margin-left: auto; color: var(--ip-orange); }
.steam-login span { font: 600 15px/1.2 'Oswald', sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.steam-login small { display: block; margin-bottom: 5px; color: #b6ada2; font-size: 8px; letter-spacing: .2em; }
.image-login-note { margin: 18px 0 0; color: #75563a; font-size: 10px; letter-spacing: .04em; }
.image-alert {
  margin: 0 0 18px;
  padding: 11px;
  color: #6d160e;
  background: rgba(155,38,24,.1);
  border: 1px solid rgba(129,35,24,.35);
  font-size: 12px;
}

/* Přihlášený obrázkový portál */
.image-portal-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 max(24px, calc((100% - 1180px) / 2));
  background: rgba(8,7,6,.95);
  border-top: 2px solid #a55925;
  border-bottom: 2px solid #613316;
  box-shadow: 0 8px 25px rgba(0,0,0,.46);
}
.image-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}
.image-brand img { width: 50px; height: 50px; object-fit: contain; }
.image-brand span { font: 400 18px/1 'Rye', serif; text-transform: uppercase; }
.image-brand em { color: var(--ip-orange); font-style: normal; }
.image-portal-header nav { display: flex; align-self: stretch; }
.image-portal-header nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  color: #cfc7bc;
  font: 600 11px/1 'Oswald', sans-serif;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}
.image-portal-header nav a::after {
  content: '';
  position: absolute;
  right: 25%;
  bottom: 8px;
  left: 25%;
  height: 2px;
  opacity: 0;
  background: var(--ip-orange);
}
.image-portal-header nav a:hover,
.image-portal-header nav a.active { color: #fff; background: rgba(160,76,27,.13); }
.image-portal-header nav a.active::after { opacity: 1; }

.image-portal-main {
  width: min(1180px, calc(100% - 36px));
  margin: 48px auto 80px;
}
.portal-notice {
  margin-bottom: 18px;
  padding: 13px 16px;
  border-left: 4px solid;
  background: rgba(10,8,6,.88);
  font-size: 13px;
}
.portal-notice.success { color: #d9efc9; border-color: #739d50; }
.portal-notice.error { color: #ffd3ca; border-color: #b8462d; }
.portal-welcome {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: clamp(32px, 5vw, 65px);
  background:
    linear-gradient(95deg, rgba(228,203,157,.97), rgba(212,180,128,.9)),
    var(--ip-paper);
  border: 1px solid #815027;
  border-bottom: 6px solid #6f3516;
  box-shadow: 10px 13px 0 rgba(0,0,0,.28);
  color: var(--ip-ink);
}
.portal-welcome > div { max-width: 720px; }
.portal-welcome h1 { font-size: clamp(35px, 5.5vw, 64px); }
.portal-welcome > div > p:last-child { max-width: 620px; color: #59422e; font: 500 16px/1.65 'Special Elite', Georgia, serif; }
.portal-welcome > img,
.portal-avatar-fallback {
  width: 145px;
  height: 145px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  object-fit: cover;
  color: #2d1b10;
  background: #b98a54;
  border: 7px solid #ead5a8;
  outline: 2px solid #73451f;
  box-shadow: 7px 9px 0 rgba(78,42,19,.25);
  transform: rotate(2deg);
  font-size: 58px;
}
.portal-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 28px 0;
}
.portal-actions a {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 22px;
  color: #f3e6d4;
  background: rgba(11,9,7,.9);
  border: 1px solid rgba(213,135,67,.42);
  border-left: 4px solid var(--ip-orange);
  text-decoration: none;
  transition: transform .2s, background .2s;
}
.portal-actions a:hover { background: #29170d; transform: translateY(-3px); }
.portal-actions i { color: var(--ip-orange); font-size: 29px; }
.portal-actions strong, .portal-actions small { display: block; }
.portal-actions strong { font: 400 19px/1.3 'Rye', serif; text-transform: uppercase; }
.portal-actions small { margin-top: 7px; color: #a99c8c; font-size: 10px; letter-spacing: .08em; }

.portal-panel {
  padding: clamp(27px, 4vw, 48px);
  color: var(--ip-ink);
  background:
    repeating-linear-gradient(-9deg, rgba(90,49,20,.028) 0 1px, transparent 1px 5px),
    var(--ip-paper);
  border: 1px solid #815027;
  box-shadow: 9px 12px 0 rgba(0,0,0,.25);
}
.portal-panel-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.portal-panel-head h2 { margin: 0; font: 400 29px/1 'Rye', serif; text-transform: uppercase; }
.portal-panel-head > a:not(.portal-button) { color: #80451e; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.portal-button,
.portal-upload-form > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 17px;
  color: #fff1dc;
  background: #713716;
  border: 1px solid #4b250f;
  border-bottom: 4px solid #351708;
  font: 600 10px/1 'Oswald', sans-serif;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.portal-button:hover,
.portal-upload-form > button:hover { background: var(--ip-orange); color: #241208; }

.upload-panel { max-width: 820px; margin: 0 auto; text-align: center; }
.portal-upload-form { margin-top: 28px; }
.portal-dropzone {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px;
  color: #503823;
  background: rgba(255,249,224,.28);
  border: 2px dashed rgba(113,59,24,.55);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.portal-dropzone:hover { background: rgba(255,249,224,.5); border-color: var(--ip-orange-dark); }
.portal-dropzone > i { margin-bottom: 17px; color: var(--ip-orange-dark); font-size: 51px; }
.portal-dropzone strong { font: 400 25px/1 'Rye', serif; text-transform: uppercase; }
.portal-dropzone span { margin-top: 8px; font: 500 14px 'Special Elite', serif; }
.portal-dropzone small { margin-top: 25px; color: #76583a; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.portal-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.selected-file { margin: 14px 0; color: #6f4d2e; font: 500 12px 'Special Elite', serif; }

.portal-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.portal-gallery.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.portal-gallery article {
  position: relative;
  overflow: hidden;
  background: rgba(255,248,222,.36);
  border: 1px solid rgba(98,55,24,.34);
}
.portal-image-open {
  position: relative;
  display: block;
  overflow: hidden;
  background: #1b120c;
  cursor: zoom-in;
}
.portal-image-open::after {
  content: '\f35d';
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  opacity: 0;
  color: #fff;
  background: rgba(12,8,5,.84);
  border: 1px solid rgba(223,121,44,.72);
  font: 900 12px/1 'Font Awesome 6 Free';
  transition: opacity .2s, transform .2s;
  transform: translateY(5px);
}
.portal-image-open:hover::after {
  opacity: 1;
  transform: translateY(0);
}
.portal-image-open img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  background: #1b120c;
  transition: filter .2s, transform .3s;
}
.portal-image-open:hover img { filter: brightness(.82); transform: scale(1.025); }
.portal-gallery.compact article > span { display: block; padding: 11px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.portal-image-card > div { padding: 13px; }
.portal-image-card strong, .portal-image-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-image-card strong { font-size: 13px; }
.portal-image-card small { margin-top: 5px; color: #75583e; font-size: 9px; }
.copy-link {
  width: calc(100% - 46px);
  min-height: 36px;
  color: #fff;
  background: #3d2414;
  border: 0;
  font: 600 9px 'Oswald', sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.portal-image-card form { position: absolute; right: 0; bottom: 0; }
.delete-image { width: 46px; height: 36px; color: #fff; background: #7c281b; border: 0; cursor: pointer; }
.portal-empty { min-height: 280px; display: grid; place-content: center; justify-items: center; gap: 15px; color: #694c33; border: 2px dashed rgba(106,62,27,.35); }
.portal-empty i { font-size: 48px; }
.portal-empty strong { font: 400 22px 'Rye', serif; text-transform: uppercase; }

.portal-profile { display: grid; grid-template-columns: 160px 1fr; gap: 30px; margin-top: 28px; }
.portal-profile > img { width: 150px; height: 150px; object-fit: cover; border: 7px solid #ead7ad; outline: 2px solid #77481f; }
.portal-profile dl { margin: 0; border-top: 1px solid rgba(96,57,27,.35); }
.portal-profile dl div { display: grid; grid-template-columns: 180px 1fr; gap: 15px; padding: 14px; border-bottom: 1px solid rgba(96,57,27,.24); }
.portal-profile dt { color: #765333; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.portal-profile dd { margin: 0; font: 500 14px 'Special Elite', serif; }

@media (max-width: 800px) {
  body { background-attachment: scroll; }
  .image-login-card { padding: 32px 25px 36px; }
  .image-back { position: absolute; top: 15px; left: 15px; }
  .image-portal-header { min-height: 58px; gap: 5px; padding: 0 8px; }
  .image-brand span { display: none; }
  .image-brand img { width: 42px; height: 42px; }
  .image-portal-header nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .image-portal-header nav::-webkit-scrollbar { display: none; }
  .image-portal-header nav a { flex: 0 0 auto; padding: 0 10px; font-size: 9px; }
  .image-portal-header nav a i { display: none; }
  .image-portal-main { width: min(100% - 20px, 1180px); margin-top: 22px; }
  .portal-welcome { display: block; padding: 31px 25px; }
  .portal-welcome > img, .portal-avatar-fallback { width: 95px; height: 95px; margin-top: 25px; }
  .portal-actions { grid-template-columns: 1fr; }
  .portal-gallery, .portal-gallery.compact { grid-template-columns: 1fr; }
  .portal-panel-head { display: block; }
  .portal-panel-head .portal-button { margin-top: 18px; }
  .portal-profile { grid-template-columns: 1fr; }
  .portal-profile dl div { grid-template-columns: 1fr; gap: 6px; }
}

/* ==========================================================================
   CENTROVANÁ RDR2 NÁSTĚNKA — tmavší, užší a výrazně westernová.
   ========================================================================== */
.image-portal-main {
  width: min(940px, calc(100% - 36px));
  margin: clamp(34px, 6vh, 70px) auto 80px;
}

.portal-welcome {
  position: relative;
  width: min(760px, 100%);
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 auto;
  padding: 54px 68px 51px;
  overflow: hidden;
  color: #f6ead8;
  background:
    radial-gradient(circle at 50% -10%, rgba(193,91,31,.2), transparent 40%),
    repeating-linear-gradient(-12deg, rgba(255,255,255,.015) 0 1px, transparent 1px 6px),
    linear-gradient(145deg, rgba(29,17,11,.98), rgba(10,8,6,.98));
  border: 1px solid rgba(218,124,54,.72);
  border-top: 4px solid #d36f29;
  border-bottom: 7px solid #47200e;
  box-shadow:
    0 0 0 5px rgba(10,7,5,.62),
    12px 16px 0 rgba(0,0,0,.35),
    0 30px 75px rgba(0,0,0,.48);
  text-align: center;
  clip-path: polygon(1% 0, 98.5% .8%, 100% 4%, 99.2% 96%, 97% 100%, 2% 99%, 0 96%, .6% 4%);
}
.portal-welcome::before {
  content: 'OUTLAW  •  IMAGE ARCHIVE  •  1885';
  position: absolute;
  top: 17px;
  left: 50%;
  color: rgba(225,141,75,.48);
  font: 600 8px/1 'Oswald', sans-serif;
  letter-spacing: .28em;
  white-space: nowrap;
  transform: translateX(-50%);
}
.portal-welcome::after {
  content: '';
  position: absolute;
  right: 32px;
  bottom: 27px;
  left: 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(223,121,44,.6), transparent);
}
.portal-welcome > div {
  max-width: 650px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.portal-welcome > img,
.portal-welcome .portal-avatar-fallback {
  order: -1;
  width: 112px;
  height: 112px;
  margin: 0 0 24px;
  border: 4px solid #d49459;
  outline: 1px solid #2c1409;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(217,121,45,.12), 5px 7px 0 rgba(0,0,0,.45);
  transform: none;
}
.portal-welcome .image-kicker {
  margin-bottom: 12px;
  color: #e89650;
  letter-spacing: .28em;
}
.portal-welcome h1 {
  max-width: 670px;
  color: #f6ead8;
  font-family: 'Sancreek', 'Rye', serif;
  font-size: clamp(40px, 6vw, 67px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: .015em;
  text-shadow: 3px 4px 0 #000;
}
.portal-welcome h1 em {
  display: inline;
  color: #e3752c;
  font-family: inherit;
  text-shadow: 3px 4px 0 #241005;
}
.portal-welcome > div > p:last-child {
  max-width: 560px;
  margin: 22px auto 0;
  color: #c9b8a2;
  font: 500 14px/1.65 'Special Elite', Georgia, serif;
  text-align: center;
}

.portal-actions {
  width: min(820px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 25px auto 0;
}
.portal-actions + .portal-panel {
  margin-top: 38px;
}
.portal-actions a {
  min-height: 126px;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 20px 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), transparent),
    rgba(9,7,5,.94);
  border: 1px solid rgba(211,113,42,.56);
  border-top: 3px solid #a95320;
  border-left: 1px solid rgba(211,113,42,.56);
  box-shadow: 4px 6px 0 rgba(0,0,0,.32);
  text-align: center;
}
.portal-actions a:hover {
  background: #32180c;
  border-top-color: #ee8b43;
  transform: translateY(-4px);
}
.portal-actions i { font-size: 27px; }
.portal-actions strong {
  font-family: 'Sancreek', 'Rye', serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .035em;
}
.portal-actions small { margin-top: 4px; }

.portal-panel h1,
.portal-panel-head h2,
.portal-dropzone strong,
.portal-empty strong,
.image-login-card h1 {
  font-family: 'Sancreek', 'Rye', serif;
}

@media (max-width: 800px) {
  .image-portal-main {
    width: min(100% - 20px, 940px);
    margin-top: 22px;
  }
  .portal-welcome {
    min-height: 430px;
    padding: 49px 25px 43px;
  }
  .portal-welcome > img,
  .portal-welcome .portal-avatar-fallback {
    width: 95px;
    height: 95px;
    margin: 0 0 22px;
  }
  .portal-welcome h1 { font-size: clamp(35px, 12vw, 51px); }
  .portal-actions { grid-template-columns: 1fr; }
  .portal-actions a { min-height: 105px; }
  .portal-actions + .portal-panel { margin-top: 28px; }
}

/* Logo a navigace ve dvou vystředěných řádcích. */
.image-portal-header {
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 9px 18px 0;
}
.image-brand {
  justify-content: center;
  min-height: 47px;
}
.image-brand img {
  width: 42px;
  height: 42px;
}
.image-brand span {
  font-family: 'Sancreek', 'Rye', serif;
  font-size: 17px;
}
.image-portal-header nav {
  min-height: 39px;
  align-self: center;
  justify-content: center;
}
.image-portal-header nav a {
  justify-content: center;
  padding: 0 19px;
}
.image-portal-header nav a::after { bottom: 5px; }

@media (max-width: 800px) {
  .image-portal-header {
    padding: 7px 8px 0;
  }
  .image-brand {
    min-height: 43px;
  }
  .image-brand img {
    width: 38px;
    height: 38px;
  }
  .image-brand span {
    display: inline;
    font-size: 14px;
  }
  .image-portal-header nav {
    width: 100%;
    min-height: 38px;
    justify-content: flex-start;
  }
  .image-portal-header nav a {
    min-height: 38px;
    padding: 0 14px;
  }
}

/* Společná patička hlavního webu a obrázkového portálu. */
body.image-portal,
body.image-gateway {
  display: flex;
  flex-direction: column;
}
.image-portal-main { flex: 1 0 auto; }
.image-gateway .image-login-shell {
  flex: 1 0 auto;
  min-height: calc(100vh - 150px);
}
.image-portal-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 150px;
  margin-top: auto;
  padding: 30px 20px 22px;
  color: #9d9589;
  background: rgba(3,3,3,.97);
  border-top: 1px solid rgba(223,121,44,.22);
  font: 500 11px/1.65 'Oswald', sans-serif;
  letter-spacing: .025em;
  text-align: center;
}
.image-portal-footer p { margin: 0; }
.image-portal-footer a {
  display: inline-block;
  margin-top: 9px;
  color: var(--ip-orange);
  font-size: 10px;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}
.image-portal-footer a:hover { color: #f3d5b8; }
.image-portal-footer img {
  width: 34px;
  height: 34px;
  display: block;
  margin: 10px auto 0;
  object-fit: contain;
  opacity: .68;
  filter: grayscale(1) brightness(1.7);
}

@media (max-width: 800px) {
  .image-portal-footer {
    min-height: 138px;
    padding-top: 25px;
  }
}
