/* ============================================
   공통 스타일 (Common Styles)
   모든 페이지에서 공통으로 사용되는 기본 스타일
   ============================================ */

/* --- 0. CSS Variables (전역 디자인 토큰) --- */
:root {
    --color-bg-dark: #1a1a1a;
    --color-bg-card: #2a2a2a;
    --color-bg-elevated: #333;
    --color-bg-hover: #444;
    --color-bg-input: #252525;
    --color-bg-form: #383838;
    --color-text-primary: #ecf0f1;
    --color-text-secondary: #ccc;
    --color-text-muted: #aaa;
    --color-text-dim: #888;
    --color-accent: #ffc107;
    --color-accent-gold: #ffd700;
    --color-link-blue: #007bff;
    --color-link-blue-hover: #0056b3;
    --color-success: #2ecc71;
    --color-danger: #e74c3c;
    --color-border: #444;
    --color-border-light: #555;
    --color-border-dark: #333;
    --color-overlay: rgba(0, 0, 0, 0.85);
    --color-overlay-light: rgba(0, 0, 0, 0.75);
    --color-chaos: #8B8000;
    --color-aequor: #005A8C;
    --color-caro: #8C0000;
    --color-ultra: #5A008C;
    --color-assault: #dc3545;
    --color-warden: #007bff;
    --color-chorus: #28a745;
    --color-ssr: #ffc107;
    --color-sr: #8a2be2;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 15px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --font-family: 'Pretendard', 'Apple SD Gothic Neo', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- 1. CSS Reset & Box Model --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- 2. Body & HTML 기본 설정 --- */
html,
body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* 가로 스크롤 방지 */
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg-dark);
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- 3. 배경 이미지 레이어 (고정) --- */
.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-image: url('../images/background.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    will-change: transform;
    transform: translateZ(0);
    height: 100vh;
    min-height: -webkit-fill-available;
    /* iOS Safari 대응 */
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1;
}

/* --- 4. 컨테이너 공통 --- */
.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- 5. 타이포그래피 --- */
h1 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    word-break: keep-all;
}

h2,
h3,
h4,
h5,
h6 {
    color: #fff;
}

/* --- 6. 링크 기본 스타일 --- */
a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* --- 7. 버튼 공통 스타일 --- */
button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: all 0.2s ease;
}

button:focus {
    outline: none;
}

/* --- 8. 뒤로가기 버튼 공통 스타일 --- */
.back-link,
.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    margin-bottom: 20px;
    background-color: #333;
    color: #ccc;
    text-decoration: none;
    border: 1px solid #444;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: bold;
    transition: all 0.2s ease;
}

.back-link:hover,
.back-button:hover {
    background-color: #444;
    color: #fff;
    border-color: #ffc107;
    transform: translateY(-2px);
}

/* --- 9. 유틸리티 클래스 --- */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* --- 10. 스크롤바 스타일 (선택적) --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #2a2a2a;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* --- 11. Floating 신고 버튼 --- */
.floating-report-btn {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    background: #3a3a3a;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.floating-report-btn:hover {
    background: #4a4a4a;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.floating-report-btn:active {
    background: #2a2a2a;
    transform: translateY(-50%) scale(0.95);
}

@media (max-width: 480px) {
    .floating-report-btn {
        width: 44px;
        height: 44px;
        font-size: 22px;
        right: 10px;
        top: auto;
        bottom: 80px;
        transform: none;
    }
    .floating-report-btn:hover {
        transform: scale(1.1);
    }
    .floating-report-btn:active {
        transform: scale(0.95);
    }
}