/* Ranking Page Styles */

/* Ranking Panel */
.ranking-panel {
    position: absolute;
    top: 20px;
    left: 116px;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    font-family: 'Kanit', sans-serif;
    box-sizing: border-box;
    padding: 16px;
    border: 2px solid #c9a861;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.5);
}

/* Header */
.ranking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
}

/* Triangles */
.header-triangles {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.triangle {
    font-size: 12px;
    line-height: 1;
}

.triangle.red {
    color: #ff4444;
}

/* Switch Button */
.switch-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 15px;
    background: linear-gradient(180deg, #FFFFFF, #E1C59C);
    border: 2px solid #c9a861;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-right: 16px;
}

.switch-button:hover {
    transform: scale(1.05);
}

.switch-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.switch-text {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

/* Date Filter Input */
/* Date Filter Trigger - Image 1 Style */
.ranking-date-container {
    margin-left: 16px;
    position: relative;
    z-index: 10;
}

.date-trigger-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 16px;
    min-width: 260px;
    background: linear-gradient(180deg, #FFF8E7 0%, #E6CFA8 100%);
    border: 3px solid #C9A861;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s;
}

.date-trigger-btn:hover {
    transform: scale(1.02);
}

.date-trigger-text {
    font-family: 'Kanit', sans-serif;
    font-weight: 900;
    font-size: 24px;
    color: #000;
    line-height: 1;
}

.date-trigger-icon {
    width: 24px;
    height: 24px;
    stroke: #000;
    stroke-width: 2;
}

/* Calendar Popup - Image 2 Style */
.calendar-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.calendar-popup {
    width: 80%;
    max-width: 300px;
    background: #F0F0F0;
    border-radius: 24px;
    padding: 24px;
    position: relative;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.calendar-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: #FF0000;
    border: 2px solid #E1C59C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

.calendar-header {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.month-nav-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    font-weight: bold;
    color: #333;
}

.current-month-label {
    font-family: 'Kanit', sans-serif;
    font-weight: 800;
    font-size: 24px;
    color: #000;
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.calendar-day-header {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    padding-bottom: 8px;
}

.calendar-day-header.sunday {
    color: #FF0000;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: #000;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
}

.calendar-day:hover:not(.empty) {
    background: rgba(0, 0, 0, 0.1);
}

.calendar-day.selected {
    background: #FF3B30;
    color: #FFF;
    box-shadow: 0 2px 5px rgba(255, 59, 48, 0.4);
}

.calendar-day.empty {
    cursor: default;
}

/* Ranking Title */
.ranking-title {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-left: auto;
    /* Push to right */
}

.ranking-title .title-line {
    font-size: 32px;
    font-weight: 900;
    font-style: Kanit;
    line-height: 0.9;
    transform: skewX(-10deg) rotate(-10deg);
    background: linear-gradient(180deg, #FFE8DB 0%, #FFCD8D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-text-stroke: 1.5px #000;
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.8));
}

/* Table Header */
.ranking-table-header {
    display: flex;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Table Body */
.ranking-table-body {
    flex: 1;
    overflow-y: auto;
}

/* Table Row */
.ranking-row {
    display: flex;
    padding: 12px 16px;
    font-size: 14px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.2s ease;
}

.ranking-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Top 3 Row Styles - only left border, no background */
.ranking-row.gold {
    border-left: 4px solid #ffd700;
}

.ranking-row.silver {
    border-left: 4px solid #c0c0c0;
}

.ranking-row.bronze {
    border-left: 4px solid #00c8ff;
}

/* Column Widths */
.col-top {
    width: 80px;
    flex-shrink: 0;
    font-weight: 700;
}

.col-player {
    flex: 1;
    text-align: center;
}

.col-rewards {
    width: 150px;
    flex-shrink: 0;
    text-align: right;
}

/* Reward Colors */
.reward-value {
    color: #b8ff84;
    font-weight: 700;
}

.reward-unit {
    color: rgba(255, 255, 255, 0.7);
}

/* Scrollbar Styling */
.ranking-table-body::-webkit-scrollbar {
    width: 4px;
}

.ranking-table-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.ranking-table-body::-webkit-scrollbar-thumb {
    background: rgba(255, 227, 170, 0.3);
    border-radius: 2px;
}

.ranking-table-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 227, 170, 0.5);
}

/* Panel Corner Rectangle - positioned inside the border at top-right */
.panel-corner-rectangle {
    position: absolute;
    top: 1px;
    right: -2px;
    z-index: 0;
    pointer-events: none;
    border-top-right-radius: 16px;
}