/* ==========================================================================
   PHOTOARENA – STÍLUSLAP (TISZTA VERZIÓ)
   Sötét téma, smaragdzöld kiemelés
   ========================================================================== */

:root {
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.25);

  --accent-gold: #f59e0b;
  --accent-silver: #94a3b8;
  --accent-bronze: #d97706;
  --accent-cyan: #06b6d4;

  --bg-page: #121316;
  --bg-card: #181a20;
  --bg-card-hover: #1f232c;
  --bg-input: #0e1013;
  --bg-header: rgba(18, 19, 22, 0.95);
  --bg-sidebar: #0d0d0d;

  --border-subtle: #272b35;
  --border-focus: #10b981;

  --text-white: #ffffff;
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--primary-hover);
}

.card-title,
.card h3,
.card h4,
a .card-title,
a h3,
a h4 {
  color: var(--primary) !important;
  text-decoration: none !important;
}
.card-title a:hover,
a:hover .card-title,
a:hover h3,
a:hover h4 {
  color: var(--primary-hover) !important;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   APP ELRENDEZÉS – SIDEBAR + TARTALOM
   ========================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 200;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.sidebar-brand .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.sidebar-brand .brand-name {
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  color: #fff;
}
.sidebar-brand .brand-name span {
  color: var(--primary);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #a7f3d0;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  position: relative;
}
.sidebar-link:hover {
  background: rgba(16, 185, 129, 0.15);
  color: #ffffff;
}
.sidebar-link.active {
  background: rgba(16, 185, 129, 0.18);
  color: var(--primary);
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.sidebar-link-admin {
  color: #6ee7b7;
}
.sidebar-link-admin:hover {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.15);
}
.sidebar-link-admin.active {
  background: rgba(16, 185, 129, 0.18);
  color: var(--primary);
}

.sidebar-icon {
  font-size: 1.05rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-label {
  flex: 1;
}

.sidebar-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-bottom {
  padding: 12px 8px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #000;
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.15s;
}
.sidebar-upload-btn:hover {
  background: var(--primary-hover);
  color: #fff;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: background 0.15s;
}
.sidebar-profile:hover {
  background: rgba(255, 255, 255, 0.06);
}
.sidebar-profile-info {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}
.sidebar-profile-info strong {
  color: #fff;
  font-size: 0.82rem;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
}
.sidebar-logout:hover {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}
.sidebar-logout .sidebar-icon {
  font-size: 1.15rem;
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 30px 40px 60px;
}
.main-content .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  display: block;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #3f4452;
}
.card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background-color: #000;
}
.card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background-color: var(--primary);
  color: #000;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #fff;
}
.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: #3f4452;
  color: #fff;
}
.btn-admin {
  background-color: rgba(16, 185, 129, 0.15);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.btn-admin:hover {
  background-color: rgba(16, 185, 129, 0.25);
  color: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-superadmin {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.badge-admin {
  background: rgba(16, 185, 129, 0.2);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.badge-member {
  background: #27272a;
  color: var(--text-muted);
}

.hero-banner {
  margin: 32px 0;
  padding: 40px;
  background: linear-gradient(135deg, #181a20, #1b1e27 60%, #121316);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.hero-content {
  max-width: 720px;
}
.hero-tag {
  display: inline-block;
  padding: 4px 12px;
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 16px;
}
.hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--text-white);
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.hero-title span {
  background: linear-gradient(90deg, var(--primary), #2dd4bf);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}
.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.form-control:focus {
  border-color: var(--border-focus);
}
textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}
.table th {
  padding: 14px 18px;
  background-color: rgba(0, 0, 0, 0.3);
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}
.table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background-color: rgba(255, 255, 255, 0.02); }

.site-footer {
  margin-top: auto;
  padding: 24px 0;
  background-color: #0e0f12;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-dim);
}
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.mobile-topbar { display: none; }
.sidebar-overlay { display: none; }

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .app-layout { flex-direction: column; }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 150;
  }
  .hamburger-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
  }
  .hamburger-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    font-size: 1rem;
  }
  .mobile-brand span { color: var(--primary); }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    height: 100vh;
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
  }
  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .main-content { padding: 20px 16px 40px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero-banner { padding: 24px; margin: 18px 0; }
  .hero-title { font-size: 1.85rem; }
  .footer-content { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .main-content { padding: 16px 12px 30px; }
}

/* ==========================================================================
   GYŐZTES KÁRTYA – heti/havi/évi győztes (share_week_winner.php)
   ========================================================================== */

.week-winner-wrapper { max-width: 820px; margin: 20px auto 40px; }

.week-winner-card {
    position: relative;
    padding: 48px 40px;
    background:
        radial-gradient(ellipse at top, rgba(251,191,36,0.20), transparent 60%),
        radial-gradient(ellipse at bottom, rgba(251,191,36,0.12), transparent 60%),
        linear-gradient(135deg, #0a0805 0%, #1a1408 50%, #0a0805 100%);
    border-radius: 28px;
    box-shadow:
        0 30px 80px rgba(0,0,0,0.8),
        inset 0 0 80px rgba(251,191,36,0.08);
    overflow: hidden;
}
.week-winner-card::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 3px solid transparent;
    border-image: linear-gradient(135deg,
        #fbbf24 0%, #fef3c7 15%, #f59e0b 30%,
        #92400e 50%, #f59e0b 70%, #fef3c7 85%, #fbbf24 100%) 1;
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
}
.week-winner-card::after {
    content: '';
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(251,191,36,0.35);
    border-radius: 16px;
    pointer-events: none;
    z-index: 1;
}
.week-winner-card .shine {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(120deg,
        transparent 30%, rgba(255, 235, 150, 0.15) 45%,
        rgba(255, 255, 255, 0.25) 50%, rgba(255, 235, 150, 0.15) 55%,
        transparent 70%);
    pointer-events: none;
    animation: shineMove 6s ease-in-out infinite;
    z-index: 2;
}
@keyframes shineMove {
    0%   { transform: translateX(-60%) translateY(-60%); }
    50%  { transform: translateX(60%) translateY(60%); }
    100% { transform: translateX(-60%) translateY(-60%); }
}
.corner-deco {
    position: absolute;
    font-size: 2rem;
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251,191,36,0.9), 0 0 40px rgba(251,191,36,0.5);
    z-index: 3;
    animation: twinkle 3s ease-in-out infinite;
}
.corner-deco.tl { top: 18px; left: 22px; }
.corner-deco.tr { top: 18px; right: 22px; transform: scaleX(-1); }
.corner-deco.bl { bottom: 18px; left: 22px; transform: scaleY(-1); }
.corner-deco.br { bottom: 18px; right: 22px; transform: scale(-1); }
@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.crown-icon {
    position: relative;
    z-index: 4;
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 4px;
    filter: drop-shadow(0 6px 20px rgba(251,191,36,0.8));
    animation: floatCrown 3.5s ease-in-out infinite;
}
@keyframes floatCrown {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}
.week-header {
    position: relative;
    z-index: 4;
    text-align: center;
    margin-bottom: 28px;
}
.week-title {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: #fcd34d;
    text-shadow: 0 0 30px rgba(251,191,36,0.7);
    margin-bottom: 8px;
}
.week-subtitle {
    font-size: 1.6rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
    margin-bottom: 6px;
}
.week-daterange {
    font-size: 0.85rem;
    color: #a1a1aa;
    letter-spacing: 2px;
    font-family: ui-monospace, monospace;
}
.week-image-frame {
    position: relative;
    z-index: 4;
    padding: 22px;
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 25%, #f59e0b 50%, #fbbf24 75%, #fef3c7 100%);
    border-radius: 22px;
    box-shadow:
        0 0 0 3px rgba(0,0,0,0.8),
        0 0 60px rgba(251,191,36,0.6),
        0 20px 50px rgba(0,0,0,0.6),
        inset 0 0 20px rgba(0,0,0,0.2);
    margin-bottom: 28px;
}
.week-image-frame img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
    display: block;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
}
.week-info {
    position: relative;
    z-index: 4;
    text-align: center;
    padding: 24px;
    background: rgba(0,0,0,0.55);
    border-radius: 16px;
    border: 1px solid rgba(251,191,36,0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.week-challenge-label {
    font-size: 0.72rem;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 8px;
}
.week-challenge-name {
    font-size: 1.35rem;
    font-weight: 900;
    color: #fcd34d;
    margin-bottom: 16px;
    text-shadow: 0 2px 15px rgba(251,191,36,0.6);
}
.week-photo-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}
.week-author {
    font-size: 0.95rem;
    color: #d4d4d8;
    margin-bottom: 18px;
}
.week-author strong { color: #fcd34d; font-weight: 800; }

.week-scores {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(251,191,36,0.3);
}
.score-box {
    text-align: center;
    padding: 14px 8px;
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.3);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 110px;
}
.score-icon {
    font-size: 1.4rem;
    margin-bottom: 6px;
    display: block;
    line-height: 1;
}
.score-label {
    font-size: 0.62rem;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    line-height: 1.2;
}
.score-value {
    font-size: 1.25rem;
    font-weight: 900;
    color: #fcd34d;
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    text-shadow: 0 0 15px rgba(251,191,36,0.5);
    line-height: 1;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

/* Az "/5" ugyanolyan méretű és színű, mint a fő szám */
.score-max {
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
    font-family: inherit;
    letter-spacing: inherit;
}

.week-total-votes {
    margin-top: 14px;
    font-size: 0.85rem;
    color: #d4d4d8;
    text-align: center;
}
.week-total-votes strong {
    color: #fcd34d;
    font-weight: 900;
}
.week-brand {
    position: relative;
    z-index: 4;
    text-align: center;
    margin-top: 28px;
    font-size: 0.8rem;
    color: #71717a;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.week-brand strong { color: #fcd34d; font-weight: 900; letter-spacing: 4px; }
.share-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 28px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .week-scores {
        grid-template-columns: repeat(2, 1fr);
    }
}