/* 슬롯 게임 QA 자동 검증 시스템 - 공통 스타일 */

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #48bb78;
    --warning: #fbbf24;
    --danger: #f56565;
    --gray-50: #f7fafc;
    --gray-100: #edf2f7;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-400: #a0aec0;
    --gray-500: #718096;
    --gray-600: #4a5568;
    --gray-700: #2d3748;
    --gray-800: #1a202c;
    --gray-900: #171923;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
}

/* 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 헤더 */
.header {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}

.header h1 {
    color: var(--gray-800);
    font-size: 32px;
    margin-bottom: 8px;
}

.header p {
    color: var(--gray-500);
    font-size: 16px;
}

/* 네비게이션 */
.nav {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.nav-btn {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 카드 */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
}

.card-header {
    margin-bottom: 20px;
}

.card-header h2 {
    color: var(--gray-800);
    font-size: 24px;
    margin-bottom: 8px;
}

.card-header p {
    color: var(--gray-500);
    font-size: 14px;
}

/* 버튼 */
.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-300);
}

.btn-success {
    background: var(--success);
}

.btn-success:hover:not(:disabled) {
    background: #38a169;
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover:not(:disabled) {
    background: #e53e3e;
}

/* 폼 요소 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: var(--gray-700);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 그리드 시각화 */
.grid-visualizer {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.reel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.symbol {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
}

.symbol:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.symbol.bounty {
    background: linear-gradient(135deg, var(--warning) 0%, #f59e0b 100%);
    color: var(--gray-800);
}

/* 배지 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: var(--gray-800);
}

.badge-danger {
    background: var(--danger);
    color: white;
}

.badge-info {
    background: var(--primary);
    color: white;
}

/* 알림 (토스트) */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    z-index: 1000;
    max-width: 400px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--primary);
}

/* 로딩 스피너 */
.spinner {
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.loading-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    text-align: center;
}

/* 결과 목록 */
.results-grid {
    display: grid;
    gap: 20px;
}

.result-card {
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    background: var(--gray-50);
    transition: all 0.2s;
}

.result-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.result-header h3 {
    color: var(--gray-800);
    font-size: 18px;
}

/* 반응형 */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    .header h1 {
        font-size: 24px;
    }

    .nav {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
        justify-content: center;
    }

    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 유틸리티 클래스 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none; }
