/* Hall of Fame Page Specific Styles */

:root {
    --pastel-bg: #fdfbf7;
    --pastel-card: #ffffff;
    --pastel-pink: #ffdae0;
    --pastel-blue: #d4e0ff;
    --pastel-mint: #d4f0f0;
    --pastel-yellow: #fff5ba;
    --pastel-purple: #e6e6ff;
    --pastel-text: #555555;
    --pastel-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.hof-page-header {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 60px;
}

.page-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px var(--pastel-yellow);
}

.page-subtitle {
    font-size: 1.1rem;
    color: #888;
}

.hof-section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 20px;
    border-left: 5px solid #9b7ed6;
    padding-left: 15px;
}

/* Legend Card */
.legend-card {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 50%, #f0f9ff 100%);
    border: 2px solid #fff;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(161, 196, 253, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

/* Diamond Sparkle Effect */
.legend-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.legend-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 900;
    margin-bottom: 15px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

.legend-name {
    font-size: 2rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.legend-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.stat-value {
    font-weight: 700;
    color: var(--primary);
    margin-left: 5px;
}

/* Monthly Best */
.monthly-best-container {
    background: var(--pastel-bg);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 1px solid #eee;
}

.monthly-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #555;
    background: var(--pastel-yellow);
    display: inline-block;
    padding: 5px 20px;
    border-radius: 20px;
}

.monthly-list {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    flex-direction: row;
    width: 100%;
}

.monthly-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    width: 200px;
    box-shadow: var(--pastel-shadow);
    transition: transform 0.2s;
    border-top: 5px solid transparent;
}

.monthly-card:hover {
    transform: translateY(-5px);
}

.monthly-card.rank-1 {
    border-color: #f1c40f;
}

.monthly-card.rank-2 {
    border-color: #95a5a6;
}

.monthly-card.rank-3 {
    border-color: #cd7f32;
}

.m-rank {
    font-size: 2rem;
    margin-bottom: 10px;
}

.m-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.m-score {
    font-size: 0.9rem;
    color: #777;
}

.m-date {
    font-size: 0.8rem;
    color: #aaa;
}

/* Calendar Grid */
.calendar-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
}

.calendar-controls button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
    transition: color 0.2s;
}

.calendar-controls button:hover {
    color: var(--accent);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--pastel-shadow);
    width: 100%;
    min-width: 700px;
    /* Force minimum width to trigger scroll on mobile */
    box-sizing: border-box;
}

.calendar-scroll-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    padding-bottom: 10px;
    /* Space for scrollbar */
}

.cal-header {
    text-align: center;
    font-weight: 700;
    padding: 10px;
    color: #777;
}

.cal-day {
    min-height: 100px;
    height: 100%;
    border-radius: 10px;
    background: #fcfcfc;
    border: 1px solid #f0f0f0;
    padding: 5px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.cal-day:hover {
    background: #fffdf5;
    border-color: var(--pastel-yellow);
}

.day-num {
    font-weight: 700;
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.day-ranks {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.day-rank-item {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    padding: 2px 4px;
}

.rank-1 {
    background-color: var(--pastel-yellow);
    color: #8a6d3b;
}

.rank-2 {
    background-color: #f2f2f2;
    color: #555;
}

.rank-3 {
    background-color: #fff0e6;
    color: #a85d32;
}

.dr-medal {
    margin-right: 2px;
}

.dr-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    margin-left: 2px;
}

.dr-score {
    font-family: monospace;
    opacity: 0.8;
    font-size: 0.7rem;
}

.no-record-day {
    text-align: center;
    color: #eee;
    font-size: 2rem;
    margin-top: 10px;
}

.loading-spinner {
    color: #999;
    font-style: italic;
}

/* Modal Base Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: pop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes pop {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #cecece;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #333;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.modal-header h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.modal-header p {
    color: #999;
    font-size: 1rem;
    margin: 0;
}

/* Daily Rank List (in Modal) */
.daily-rank-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 5px;
}

.daily-rank-row {
    display: grid;
    grid-template-columns: 50px 1fr 100px;
    align-items: center;
    padding: 12px;
    background: #fdfdfd;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    transition: transform 0.2s;
}

.daily-rank-row:hover {
    transform: translateX(3px);
    background: #fafafa;
}

.daily-rank-row.rank-1 {
    background: #fffdf5;
    border-color: #f1c40f;
}

.daily-rank-row.rank-2 {
    background: #fdfdfe;
    border-color: #bdc3c7;
}

.daily-rank-row.rank-3 {
    background: #fffbf7;
    border-color: #cd7f32;
}

.r-rank {
    font-weight: 800;
    font-size: 1.2rem;
    color: #ccc;
    font-style: italic;
    text-align: center;
}

.daily-rank-row.rank-1 .r-rank {
    color: #f1c40f;
    font-size: 1.5rem;
}

.daily-rank-row.rank-2 .r-rank {
    color: #95a5a6;
    font-size: 1.4rem;
}

.daily-rank-row.rank-3 .r-rank {
    color: #cd7f32;
    font-size: 1.3rem;
}

.r-name {
    font-weight: 600;
    color: #333;
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.r-score {
    text-align: right;
    font-family: monospace;
    font-weight: 700;
    color: var(--primary);
}

.r-score span {
    font-size: 0.8rem;
    color: #999;
    margin-left: 2px;
}

/* Clickable Calendar Day */
.cal-day.has-data {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cal-day.has-data:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    background: #fffdf0;
    border-color: #f1c40f;
    z-index: 5;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.8rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .legend-name {
        font-size: 1.5rem;
    }

    .legend-stats {
        font-size: 0.9rem;
        flex-direction: column;
        gap: 5px;
    }
}