/* 메인 색상 변수 */
:root {
    --main-color: #BE1111;
    --main-color-dark: #8B0D0D;
    --main-color-light: #E63946;
    --main-color-hover: #D32F2F;
    --gradient-start: #BE1111;
    --gradient-end: #8B0D0D;
}

/* 기본 스타일 */
.lotto-number {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin: 2px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lotto-number:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .lotto-number {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .lotto-number {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 12px;
        margin: 1px;
    }
}

/* 광고 영역 스타일 */
.ad-container {
    margin: 20px 0;
    text-align: center;
    min-height: 100px;
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-container.horizontal {
    width: 100%;
    min-height: 90px;
}

.ad-container.vertical {
    width: 100%;
    min-height: 250px;
}

.ad-container.square {
    width: 100%;
    min-height: 250px;
}

/* 데스크톱 광고 사이드바 */
@media (min-width: 992px) {
    .ad-sidebar {
        position: sticky;
        top: 20px;
        height: fit-content;
    }
    
    .ad-container.vertical {
        min-height: 600px;
    }
}

/* 모바일 광고 최적화 */
@media (max-width: 768px) {
    .ad-container {
        margin: 15px 0;
        min-height: 50px;
    }
    
    .ad-container.horizontal {
        min-height: 50px;
    }
    
    .ad-container.vertical {
        min-height: 100px;
    }
}

/* 카드 스타일 */
.card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: none;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main-color-dark) 100%);
    color: white;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-bottom: none;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main-color-dark) 100%) !important;
}

.card-body {
    padding: 1.5rem;
}

@media (max-width: 768px) {
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* 테이블 반응형 */
.table-responsive {
    overflow-x: auto;
}

@media (max-width: 768px) {
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
}

/* 네비게이션 스타일 */
.navbar {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main-color-dark) 100%) !important;
    box-shadow: 0 2px 10px rgba(190, 17, 17, 0.3);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white !important;
    transition: opacity 0.3s ease;
}

.navbar-brand:hover {
    opacity: 0.9;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-top: 8px;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--main-color);
    color: white;
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand img {
        height: 32px;
    }
}

/* 게시판 목록 반응형 */
@media (max-width: 768px) {
    .board-list-mobile {
        display: block;
    }
    
    .board-list-desktop {
        display: none;
    }
}

@media (min-width: 769px) {
    .board-list-mobile {
        display: none;
    }
    
    .board-list-desktop {
        display: block;
    }
}

/* 통계 차트 반응형 */
.statistics-chart {
    max-height: 400px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .statistics-chart {
        max-height: 300px;
    }
}

/* 컨텐츠 영역 최적화 */
.main-content {
    min-height: calc(100vh - 200px);
}

/* 광고 배치를 위한 그리드 */
.content-with-ads {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 992px) {
    .content-with-ads {
        grid-template-columns: 1fr 300px;
    }
}

@media (min-width: 1200px) {
    .content-with-ads {
        grid-template-columns: 1fr 320px;
    }
}

/* 푸터 반응형 */
footer {
    margin-top: auto;
}

@media (max-width: 768px) {
    footer {
        font-size: 0.875rem;
        padding: 1rem 0;
    }
}

/* 게시글 내용 스타일 */
.post-content {
    line-height: 1.8;
    word-wrap: break-word;
}

/* 댓글 스타일 */
.comment-item {
    padding: 10px 0;
}

/* 페이지네이션 반응형 */
.pagination {
    flex-wrap: wrap;
}

.pagination .page-link {
    color: var(--main-color);
    border-color: #dee2e6;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: var(--main-color);
    color: white;
    border-color: var(--main-color);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background-color: var(--main-color);
    border-color: var(--main-color);
    box-shadow: 0 2px 8px rgba(190, 17, 17, 0.3);
}

@media (max-width: 576px) {
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* 버튼 스타일 */
.btn-primary {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main-color-dark) 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(190, 17, 17, 0.3);
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--main-color-hover) 0%, var(--main-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(190, 17, 17, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* 배지 스타일 */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 500;
    border-radius: 6px;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* 푸터 스타일 */
footer {
    margin-top: auto;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 2rem 0;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

/* 테이블 스타일 */
.table thead th {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main-color-dark) 100%);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table thead.table-dark th {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main-color-dark) 100%) !important;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 리스트 그룹 스타일 */
.list-group-item {
    border: none;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
    padding: 1rem 1.25rem;
}

.list-group-item:hover {
    background-color: #f8f9fa;
    padding-left: 1.5rem;
    border-left: 3px solid var(--main-color);
}

.list-group-item-action:hover {
    background-color: rgba(190, 17, 17, 0.05);
    color: var(--main-color);
}

/* 폼 스타일 */
.form-control:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 0.2rem rgba(190, 17, 17, 0.25);
}

.form-select:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 0.2rem rgba(190, 17, 17, 0.25);
}

.form-check-input:checked {
    background-color: var(--main-color);
    border-color: var(--main-color);
}

/* 알림 스타일 */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.alert-danger {
    background-color: #fff5f5;
    color: #c53030;
    border-left: 4px solid #c53030;
}

.alert-success {
    background-color: #f0fff4;
    color: #22543d;
    border-left: 4px solid #38a169;
}

.alert-info {
    background-color: #ebf8ff;
    color: #2c5282;
    border-left: 4px solid #3182ce;
}

/* 로고 스타일 */
.logo {
    height: 40px;
    width: auto;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.9;
}

.logo-white {
    filter: brightness(0) invert(1);
}

/* 그라데이션 배경 */
.gradient-bg {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 스크롤바 스타일 (웹킷 브라우저) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--main-color-dark);
}

/* 추가 디자인 요소 */
.hero-section {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main-color-dark) 100%);
    color: white;
    padding: 3rem 0;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    color: white;
    padding: 0.5em 1em;
    font-size: 1rem;
}

/* 탭 스타일 */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: var(--main-color);
    color: var(--main-color);
}

.nav-tabs .nav-link.active {
    color: var(--main-color);
    border-bottom-color: var(--main-color);
    background-color: transparent;
    font-weight: 600;
}

/* 입력 그룹 스타일 */
.input-group .form-control:focus {
    z-index: 3;
}

.input-group .btn {
    border-left: none;
}

/* 모달 스타일 */
.modal-header {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main-color-dark) 100%);
    color: white;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* 드롭다운 스타일 */
.dropdown-item.active {
    background-color: var(--main-color);
    color: white;
}

/* 로딩 애니메이션 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--main-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* 호버 효과 개선 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(190, 17, 17, 0.15);
}

/* 텍스트 그라데이션 */
.text-gradient {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main-color-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

/* 섹션 구분선 */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--main-color), transparent);
    margin: 2rem 0;
}

/* 아이콘 스타일 */
.bi {
    vertical-align: -0.125em;
}

/* 반응형 이미지 */
img {
    max-width: 100%;
    height: auto;
}

/* 부드러운 전환 효과 */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* 배경 그라데이션 */
body {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
}

/* 메인 컨테이너 스타일 */
.container {
    position: relative;
}

/* 카드 그룹 스타일 */
.card-group .card {
    border-radius: 12px;
    overflow: hidden;
}

/* 테이블 스타일 개선 */
.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(190, 17, 17, 0.02);
}

.table-hover > tbody > tr:hover > td {
    background-color: rgba(190, 17, 17, 0.05);
}

/* 링크 스타일 */
a {
    color: var(--main-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--main-color-dark);
    text-decoration: underline;
}

/* 입력 필드 포커스 효과 */
.form-control:focus,
.form-select:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 0.2rem rgba(190, 17, 17, 0.25);
}

/* 체크박스 및 라디오 버튼 */
.form-check-input:checked {
    background-color: var(--main-color);
    border-color: var(--main-color);
}

.form-check-input:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 0.25rem rgba(190, 17, 17, 0.25);
}

/* 드롭다운 메뉴 */
.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--main-color);
    color: white;
}

.dropdown-item.active {
    background-color: var(--main-color);
    color: white;
}

/* 배지 스타일 개선 */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: 6px;
    font-size: 0.875em;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

/* 모달 스타일 */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-radius: 12px 12px 0 0;
    padding: 1.25rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

/* 툴팁 스타일 */
.tooltip-inner {
    background-color: var(--main-color);
    color: white;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--main-color);
}

/* 프로그레스 바 */
.progress {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    background: linear-gradient(90deg, var(--main-color) 0%, var(--main-color-dark) 100%);
}

/* 아코디언 스타일 */
.accordion-button:not(.collapsed) {
    background-color: rgba(190, 17, 17, 0.1);
    color: var(--main-color);
    box-shadow: none;
}

.accordion-button:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 0.25rem rgba(190, 17, 17, 0.25);
}

/* 로딩 스피너 */
.spinner-border {
    color: var(--main-color);
}

/* 텍스트 강조 */
.text-main {
    color: var(--main-color) !important;
}

.bg-main {
    background-color: var(--main-color) !important;
}

/* 그림자 효과 */
.shadow-main {
    box-shadow: 0 4px 12px rgba(190, 17, 17, 0.15) !important;
}

/* 반응형 개선 */
@media (max-width: 576px) {
    .card-header h4,
    .card-header h5 {
        font-size: 1.1rem;
    }
    
    .lotto-number {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 11px;
    }
}

