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

  body {
    background: linear-gradient(145deg, #1a1a2e 0%, #0f0f1f 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'IRANSans', 'sans-serif';

    padding: 2rem 1.5rem;
  }

  .leaderboard {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
  }

  /* Header */
  .royal-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
  }
  .royal-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #e9c891, #f9e0a0, #c9a03d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
  }
  .royal-header p {
    color: #cfc5a5;
    font-style: italic;
    border-top: 1px solid rgba(212, 175, 55, 0.4);
    display: inline-block;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
  }

  /* Columns Grid */
  .towers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    align-items: flex-end;
  }

  .column-card {
    flex: 1;
    min-width: 250px;
    max-width: 310px;
    transition: all 0.2s ease;
    cursor: default;
  }

  /* Palace column structure */
  .palace-column {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.4));
  }

  
  .crown-dome {
    width: 92%;
    height: 58px;
    background: inherit;
    border-radius: 50% 50% 40% 40% / 70% 70% 30% 30%;
    box-shadow: inset 0 -3px 6px rgba(0,0,0,0.3), 0 6px 12px rgba(0,0,0,0.2);
    transition: all 0.3s;
    position: relative;
    z-index: 2;
  }
  .crown-dome::before {
    content: "⚜️⚜️";
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 14px;
    letter-spacing: 4px;
    opacity: 0.6;
    filter: drop-shadow(0 1px 1px black);
    pointer-events: none;
  }

  /* Column Shaft (بدنه ستون) - taller for better trophy placement */
  .column-shaft {
    width: 80%;
    min-height: 340px;
    background: inherit;
    margin-top: -12px;
    border-radius: 30% 30% 12px 12px / 20% 20% 8px 8%;
    position: relative;
    box-shadow: -6px 0 8px rgba(0,0,0,0.2), 6px 0 8px rgba(0,0,0,0.2), inset 2px 2px 8px rgba(255,255,255,0.2), inset -2px -2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  /* Decorative filigree + c-scroll (background) */
  .column-shaft .filigree-cmotif {
    position: absolute;
    top: 10%;
    bottom: 10%;
    left: 5%;
    right: 5%;
    background-image: radial-gradient(circle at 10% 30%, rgba(255,245,200,0.25) 1.5px, transparent 1.5px),
                      radial-gradient(circle at 90% 60%, rgba(245,225,150,0.2) 1.8px, transparent 1.8px);
    background-size: 24px 32px, 30px 36px;
    background-repeat: repeat;
    pointer-events: none;
    border-radius: inherit;
  }
  .column-shaft .c-scroll {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 200"><path fill="none" stroke="rgba(255,215,150,0.35)" stroke-width="1.6" d="M20,25 C35,35 30,55 18,70 C10,80 22,95 32,92 C44,88 46,70 35,58 C26,48 32,38 45,38 C56,38 58,52 48,65 C38,78 55,88 70,78" /><path fill="none" stroke="rgba(255,215,150,0.35)" stroke-width="1.2" d="M72,30 C85,42 78,60 66,70 C58,78 70,96 85,88 C97,81 90,62 76,56 C64,51 67,42 78,42 C86,42 90,54 84,68 C78,80 92,92 105,84" /></svg>') repeat-y;
    background-size: 50px 110px;
    background-position: center;
    opacity: 0.5;
    pointer-events: none;
  }

  /* ========== TROPHY INSIDE SHAFT - بزرگتر و چسبیده به پایین ========== */
  .trophy-inside {
    position: relative;
    z-index: 20;
    width: 300px;        /* بزرگتر */
    height: 300px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,0.5));
    transition: transform 0.3s ease, filter 0.2s;
    cursor: pointer;
    align-self: center;
    /* چسبیدن به پایین: استفاده از margin-top اتوماتیک */
    margin-top: auto;
  }
  .trophy-inside img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.2s;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
  }
 
  .trophy-inside:hover::after {
    opacity: 0.95;
  }
  /* hidden file input */
  .trophy-upload-input {
    display: none;
  }

  /* Plinth (Stone base) */
  .column-plinth {
    width: 96%;
    height: 32px;
    background: linear-gradient(145deg, #28241c, #16120e);
    border-radius: 8px 8px 12px 12px;
    margin-top: -8px;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3);
    border-top: 1px solid rgba(228, 195, 85, 0.5);
    position: relative;
    z-index: 2;
  }
  .column-plinth::after {
    content: "▂▃▅▇█";
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    letter-spacing: 4px;
    color: #cbb26a;
    opacity: 0.6;
  }

  /* Tier name */
  .tier-name {
    text-align: center;
    margin-top: 22px;
    font-family: 'IRANSans', 'sans-serif';
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: white;
    text-shadow: 0 2px 4px black, 0 0 4px rgba(0,0,0,0.5), 0 0 2px #e4bc7c;
    -webkit-text-stroke: 0.5px rgba(212, 175, 55, 0.7);
  }
  .upload-hint {
    font-size: 0.7rem;
    display: block;
    font-weight: 400;
    color: #ffe2a4;
    letter-spacing: 0;
    margin-top: 5px;
  }

  /* ----- TIER BACKGROUNDS (marble/bronze/silver/gold) ----- */
  .tier-1 .column-shaft, .tier-1 .crown-dome {
    background: linear-gradient(135deg, #0b0c1a 0%, #1a1f3a 35%, #0f1025 100%);
  }
  .tier-1 .column-shaft {
    background: radial-gradient(circle at 30% 20%, #21244b, #03040e);
    box-shadow: inset -3px 0 8px rgba(255,255,200,0.1), inset 2px 0 5px rgba(0,0,0,0.6), 4px 0 12px rgba(0,0,0,0.3);
  }
  .tier-2 .column-shaft, .tier-2 .crown-dome {
    background: linear-gradient(135deg, #b87333, #cd7f32, #a0522d, #d98c3f);
  }
  .tier-2 .column-shaft {
    background: linear-gradient(145deg, #c17a3e, #9e5e2a, #bc6f2c);
  }
  .tier-3 .column-shaft, .tier-3 .crown-dome {
    background: linear-gradient(135deg, #e0e4e8, #c0c8d0, #b0b8c2, #d4dfe8);
  }
  .tier-3 .column-shaft {
    background: linear-gradient(125deg, #eef2f7, #bdc3cf, #d0d9e5);
  }
  .tier-4 .column-shaft, .tier-4 .crown-dome {
    background: linear-gradient(145deg, #f3b33d, #e2a526, #c57f1e, #f5c542);
  }
  .tier-4 .column-shaft {
    background: radial-gradient(circle at 40% 30%, #f8cc6c, #d4a135);
  }
  /* filigree specials */
  .tier-1 .filigree-cmotif, .tier-1 .c-scroll { opacity: 0.7; }
  .tier-2 .filigree-cmotif { background-image: radial-gradient(circle at 20% 40%, rgba(255,215,0,0.4) 1.8px, transparent 1.5px); }
  .tier-3 .filigree-cmotif { background-image: radial-gradient(circle at 70% 20%, rgba(255,255,255,0.5) 1.5px, transparent 1.5px); }
  .tier-4 .filigree-cmotif { background-image: radial-gradient(circle at 60% 70%, rgba(255,220,100,0.5) 2px, transparent 2px); }

  /* Hover interactions */
  .column-card:hover .palace-column {
    filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.6));
  }
  
  .column-card:hover .trophy-inside {
    transform: scale(1.1);
    transition: transform 0.2s cubic-bezier(0.2, 1.2, 0.8, 1);
  }
  /* lighting up */
  .column-card:hover.tier-1 .column-shaft {
    background: linear-gradient(135deg, #2f2f6a, #1B1C44, #221f50);
    box-shadow: 0 0 18px rgba(120, 100, 200, 0.5);
  }
  .column-card:hover.tier-2 .column-shaft {
    background: radial-gradient(circle at 30% 20%, #f5bc70, #df9a48, #f5bc70);
    box-shadow: 0 0 18px rgba(255, 200, 90, 0.7);
  }
  .column-card:hover.tier-3 .column-shaft {
    background: linear-gradient(145deg, #ffffff, #eef3fc, #d0dbe8);
    box-shadow: 0 0 20px rgba(210, 220, 250, 0.9);
  }
  .column-card:hover.tier-4 .column-shaft {
    background: radial-gradient(circle at 50% 20%, #ffdf9c, #f3bc4a, #ffd966);
    box-shadow: 0 0 22px #ffd966;
  }
  .column-card:hover .crown-dome {
    filter: brightness(1.2);
  }

  /* Responsive */
  @media (max-width: 600px) {
    .towers-grid {
      flex-direction: column;
      align-items: center;
      gap: 2.5rem;
    }
    .column-card {
      max-width: 330px;
      width: 90%;
    }
    .column-shaft {
      min-height: 260px !important;
    }
    .trophy-inside {
      width: 115px;
      height: 115px;
      margin-bottom: 12px;
    }
    .tier-name {
      font-size: 1.3rem;
    }
    .crown-dome {
      height: 48px;
    }
  }

  footer {
    margin-top: 3rem;
    text-align: center;
    font-family: 'IRANSans', 'sans-serif';
    color: #9a8c6f;
    font-size: 0.75rem;
  }



  /* نوار دکمه‌ها */
  .action-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.8rem;
    flex-wrap: wrap;
  }

  .btn-leader {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(212, 175, 55, 0.7);
    padding: 0.8rem 2.2rem;
    border-radius: 60px;
    font-family: 'IRANSans', 'sans-serif';
    font-weight: 700;
    font-size: 1.2rem;
    color: #f7e5b5;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 14px rgba(0,0,0,0.3);
    text-decoration: none;
    background-color: #191e2c;
  }

  .btn-leader i {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 2px gold);
  }

  .btn-leader:hover {
    transform: translateY(-3px);
    background: #d4af37;
    color: #0a0c12;
    border-color: #ffdf8c;
    box-shadow: 0 14px 25px -8px black;
  }

  .btn-leader:active {
    transform: translateY(2px);
  }
