/* Game Page Specific Styles */

.layout-container {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 1000px;
    height: 85vh;
}

/* 왼쪽: 게임 영역 */
.game-section {
    flex: 1.2;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.2s ease;
}

/* 오른쪽: 랭킹 영역 */
.rank-section {
    flex: 0.8;
    background: var(--primary);
    color: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.rank-section h2 {
    color: white;
}

h1.club-name {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: -1px;
    text-align: center;
}

.sub-title {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
}

.keyboard-hint {
    background-color: #eee;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1rem;
    font-weight: bold;
    display: inline-block;
}

/* 게임 디스플레이 */
.timer-box {
    background: #f8f9fa;
    width: 100%;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
    border: 2px solid #e9ecef;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: background-color 0.3s, border-color 0.3s;
}

.target-badge {
    font-family: 'Chakra Petch';
    color: #bdc3c7;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-size: 1rem;
}

.time-display {
    font-size: 5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
    line-height: 1;
    transition: color 0.3s;
}

.time-hidden {
    color: var(--blur-text);
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    letter-spacing: 5px;
    filter: blur(4px);
}

.diff-text {
    min-height: 60px;
    margin-top: 15px;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 입력 필드 */
.input-group {
    width: 100%;
    margin-bottom: 1rem;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    outline: none;
    transition: 0.3s;
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

/* 버튼 */
.btn {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    user-select: none;
}

.btn:active,
.btn.pressed {
    box-shadow: none;
    transform: translateY(4px);
}

.btn-start {
    background: var(--primary);
    color: white;
}

.btn-stop {
    background: var(--accent);
    color: white;
    display: none;
}

.btn-reset {
    background: var(--success);
    color: white;
    display: none;
    margin-top: 10px;
    font-size: 1.2rem;
}

.btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 랭킹 리스트 */
.rank-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.rank-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.rank-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

/* 스크롤바 커스텀 */
.rank-list::-webkit-scrollbar {
    width: 6px;
}

.rank-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.rank-item {
    display: grid;
    grid-template-columns: 40px 1fr 90px;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: transform 0.2s;
}

.rank-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(2px);
}

.rank-item.top-1 {
    background: rgba(241, 196, 15, 0.2);
    border: 1px solid var(--gold);
}

.rank-item.top-2 {
    background: rgba(149, 165, 166, 0.2);
    border: 1px solid var(--silver);
}

.rank-item.top-3 {
    background: rgba(205, 127, 50, 0.2);
    border: 1px solid var(--bronze);
}

.rank-badge {
    font-weight: bold;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
}

.rank-name {
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-time {
    text-align: right;
    font-family: monospace;
    font-weight: bold;
}

.admin-tools {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    justify-content: flex-end;
}

.btn-admin {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-admin:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Share Buttons */
.share-buttons {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.share-btn {
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.share-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.share-link {
    background: #ffffff;
    color: #2c3e50;
    border: 1px solid #e1e4e8;
}

.rank-caption {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: -6px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

/* Hall of Fame Styles (for game page) */
.hof-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 10px;
    text-align: center;
}

/* Global Best (Diamond/Crystal) */
.hof-global-best {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 50%, #f0f9ff 100%);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(161, 196, 253, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.8);
    color: #2c3e50;
    position: relative;
    overflow: hidden;
    border: 2px solid #fff;
}

.hof-global-best::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;
}

/* Yesterday's Winner (Gold) */
.hof-yesterday {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(246, 211, 101, 0.3);
    color: white;
    transform: scale(0.95);
    position: relative;
    overflow: hidden;
}

.hof-title {
    font-size: 0.9rem;
    margin-bottom: 5px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.hof-name {
    font-size: 1.5rem;
    font-weight: 900;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 2px;
}

.hof-score {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Chakra Petch', sans-serif;
}

.hof-offline {
    background: #bdc3c7;
    color: white;
    padding: 15px;
    border-radius: 12px;
    font-weight: bold;
    opacity: 0.8;
}

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .layout-container {
        flex-direction: column;
        height: auto;
        padding-bottom: 20px;
    }

    .game-section {
        min-height: 480px;
        padding: 1.5rem;
    }

    .rank-section {
        min-height: 400px;
    }

    .time-display {
        font-size: 4rem;
    }

    .club-name img {
        height: 80px !important;
    }

    h1.club-name img {
        max-width: 100%;
        height: auto;
        max-height: 80px;
    }
}