:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #f3e5ab;
    /* Light gold/beige */
    --gold: #d4af37;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --card-bg: rgba(255, 255, 255, 0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background: radial-gradient(circle at center bottom, #4a3b18 0%, #000000 70%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

header {
    flex: 1;
    max-width: 300px;
}

h1 {
    font-size: 4rem;
    line-height: 1;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 1rem;
}

h1 span {
    color: #888;
    /* Darker grey for the second word */
}

.date {
    color: #c4a468;
    /* Goldish text */
    font-size: 1.2rem;
    font-weight: 400;
}

.update-date {
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 300;
    margin-top: 0.5rem;
    opacity: 0.8;
}

#ranking-container {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Align items to the bottom so they stand on the same baseline visually */
    gap: 2rem;
}

.rank-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: transform 0.3s ease;
}

.rank-card:hover {
    transform: translateY(-10px);
}

/* Order for visual hierarchy: Manager (Left) - Rank 1 (Center) - Rank 2 (Right) */
.rank-card.rank-1 {
    order: 2;
}

/* 1st place in middle */
.rank-card.rank-special {
    order: 1;
}

/* Manager on left */
.rank-card.rank-2 {
    order: 3;
}

/* 2nd place on right */

.image-container {
    position: relative;
    margin-bottom: 1rem;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid transparent;
    background-color: #333;
    /* Placeholder color */
}

.rank-number {
    position: absolute;
    bottom: 0;
    right: -10px;
    font-size: 8rem;
    font-weight: 900;
    line-height: 0.8;
    color: #fdf6e3;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.info p {
    font-size: 1.1rem;
    color: #888;
    font-weight: 500;
}

/* Specific sizing for ranks */
.rank-1 .profile-img {
    width: 280px;
    height: 280px;
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.rank-1 .rank-number {
    font-size: 10rem;
    right: -20px;
}

.rank-2 .profile-img {
    width: 280px;
    height: 280px;
    border-color: var(--silver);
}

/* Special card (Manager) styling */
.rank-special .profile-img {
    width: 160px;
    height: 160px;
    border-color: #444;
    /* Neutral border */
    filter: grayscale(20%);
    /* Slight distinction */
}

/* Responsive Design */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
        text-align: center;
    }

    header {
        margin-bottom: 2rem;
        max-width: 100%;
    }

    #ranking-container {
        flex-wrap: wrap;
        align-items: center;
    }

    /* On mobile, keep the order logical: 1, 2, Special or Special, 1, 2? 
       Let's keep the visual order: Manager, 1, 2 */
    .rank-card.rank-special {
        order: 1;
    }

    .rank-card.rank-1 {
        order: 2;
    }

    .rank-card.rank-2 {
        order: 3;
    }
}

/* Styles for Index 2 (Ranks 3-5) */
.logo-container {
    position: absolute;
    top: 2rem;
    right: 3rem;
    text-align: right;
    z-index: 100;
}

.logo-text {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 2.5rem;
    line-height: 0.8;
    color: #ffffff;
}

.logo-symbol {
    font-size: 2.5rem;
    vertical-align: middle;
}

.logo-sub {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--gold);
    font-weight: 400;
    display: block;
    margin-top: 5px;
}

.center-content {
    justify-content: center;
    height: 100vh;
}

#ranking-container-2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
}

/* Uniform styling for ranks 3, 4, 5 */
.simple-rank .profile-img {
    width: 280px;
    height: 280px;
    border-color: transparent;
    /* No border or simple border */
    box-shadow: none;
}

.simple-rank .rank-number {
    font-size: 8rem;
    right: -30px;
    bottom: -10px;
    color: #fdf6e3;
}

.simple-rank .info h2 {
    font-size: 1.3rem;
    margin-top: 1rem;
}

/* Crown Icon Styling */
.crown-icon {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    color: #ffd700;
    /* Gold */
    z-index: 20;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
    animation: float 3s ease-in-out infinite;
}

.crown-icon svg {
    width: 100%;
    height: 100%;
    stroke: #ffd700;
    stroke-width: 1.5;
}

@keyframes float {
    0% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }

    100% {
        transform: translateX(-50%) translateY(0);
    }
}

/* Logo Image Styling */
.logo-img {
    width: 135px;
    /* Reduced by approx 1/3 from 200px */
    height: auto;
    display: block;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    }

    50% {
        box-shadow: 0 0 50px rgba(212, 175, 55, 0.6);
    }

    100% {
        box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    }
}

@keyframes glow {
    0% {
        text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    }

    50% {
        text-shadow: 2px 2px 20px rgba(255, 255, 255, 0.4), 0 0 10px rgba(253, 246, 227, 0.2);
    }

    100% {
        text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    }
}

/* Apply Animations */
.rank-card {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    /* Start hidden */
}

/* Staggered delays for entrance */
.rank-card:nth-child(1) {
    animation-delay: 0.2s;
}

.rank-card:nth-child(2) {
    animation-delay: 0.4s;
}

.rank-card:nth-child(3) {
    animation-delay: 0.6s;
}

.rank-1 .profile-img {
    animation: pulse 3s infinite ease-in-out;
}

.rank-number {
    animation: glow 4s infinite ease-in-out;
}