/* 顏色獵人遊戲專用樣式 */

/* 語言選擇頁面樣式 */
.theme-card {
    min-height: 200px;
}

.loading-card,
.error-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: var(--color-white);
    border: 2px dashed var(--color-purple);
    border-radius: 16px;
}

.error-card {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* 遊戲進行頁面樣式 */
.game-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-white);
}

.game-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--color-purple), var(--color-blue));
    color: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.header-center {
    text-align: center;
    padding: 0 1rem;
}

.header-center h2 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--color-white);
}

.back-button {
    color: var(--color-white);
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    display: inline-block;
    white-space: nowrap;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.back-button:active {
    background-color: rgba(255, 255, 255, 0.3);
}

.game-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

/* 輪盤容器 */
.roulette-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

#roulette-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 輪盤指針 */
.roulette-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #333333;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 10;
    pointer-events: none;
}

/* 主題切換按鈕 */
.theme-button {
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(187, 145, 255, 0.2);
    color: var(--color-purple);
    border: 2px solid var(--color-purple);
    margin-bottom: 1.5rem;
}

.theme-button:hover {
    background: var(--color-purple);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(187, 145, 255, 0.3);
}

.theme-button:active {
    transform: translateY(0);
}

/* 遊戲控制按鈕 */
.game-controls {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

.start-button {
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--color-orange);
    color: var(--color-black);
    width: 100%;
}

.start-button:hover:not(:disabled) {
    background: var(--color-blue);
    color: var(--color-white);
    transform: scale(1.05);
}

.start-button:active:not(:disabled) {
    transform: translateY(0);
}

.start-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .game-header {
        padding: 0.75rem 1rem;
        min-height: 60px;
    }

    .header-center h2 {
        font-size: 1.2rem;
    }

    .back-button {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .game-main {
        padding: 1rem;
        justify-content: flex-start;
        padding-top: 2rem;
    }

    .roulette-container {
        max-width: 400px;
        margin-bottom: 2rem;
    }

    .roulette-pointer {
        border-left: 15px solid transparent;
        border-right: 15px solid transparent;
        border-top: 30px solid #333333;
    }

    .start-button {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .game-header {
        padding: 0.5rem 0.75rem;
        min-height: 56px;
    }

    .header-center h2 {
        font-size: 1rem;
    }

    .back-button {
        font-size: 0.85rem;
        padding: 0.35rem 0.7rem;
    }

    .game-main {
        padding: 0.75rem;
        padding-top: 1.5rem;
    }

    .roulette-container {
        max-width: 300px;
        margin-bottom: 1.5rem;
    }

    .roulette-pointer {
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
        border-top: 24px solid #333333;
    }

    .start-button {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .theme-button {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
}

/* 主題選擇 Modal 樣式 */
.theme-selector-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
    max-height: 60vh;
    overflow-y: auto;
}

.theme-strip-wrapper {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.theme-strip-wrapper:hover {
    border-color: rgba(187, 145, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-strip-wrapper.selected {
    border-color: var(--color-purple);
    box-shadow: 0 4px 16px rgba(187, 145, 255, 0.4);
}

.theme-strip {
    display: flex;
    width: 100%;
    height: 60px;
}

.theme-color-block {
    flex: 1;
    transition: all 0.2s ease;
}

.theme-strip-wrapper:hover .theme-color-block {
    filter: brightness(1.1);
}

.theme-selected-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-purple);
    font-size: 2rem;
    font-weight: bold;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .theme-strip {
        height: 50px;
    }
    
    .theme-selected-indicator {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .theme-strip {
        height: 40px;
    }
    
    .theme-selected-indicator {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    
    .theme-selector-container {
        gap: 0.75rem;
    }
}
