/* 로또 번호 생성기 - 모노톤 트렌디 스타일 */

:root {
    --primary-black: #1a1a1a;
    --secondary-black: #2d2d2d;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #495057;
    --white: #ffffff;
    --border-color: #dee2e6;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.2);
    --accent-gray: #e9ecef;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-gray);
    color: var(--primary-black);
    line-height: 1.6;
    font-weight: 400;
}

/* 헤더 스타일 */
header {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    box-shadow: 0 4px 20px var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.05) 50%, transparent 60%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

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

/* 메인 그리드 레이아웃 */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* 카드 스타일 */
.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px var(--shadow-medium);
}

.card-header {
    background: var(--primary-black);
    color: var(--white);
    padding: 25px 30px;
    border-bottom: none;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30px;
    right: 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-body {
    padding: 30px;
}

/* 로또 번호 볼 스타일 */
.lotto-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: var(--white);
    margin: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    animation: ballAppear 0.6s ease-out forwards;
    transform: scale(0);
}

.lotto-ball::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 30%;
    height: 30%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lotto-ball:hover {
    transform: scale(1.1);
}

/* 모노톤 번호 색상 */
.lotto-ball.range-1-10 { 
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    box-shadow: 0 4px 16px rgba(26, 26, 26, 0.3);
}

.lotto-ball.range-11-20 { 
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    box-shadow: 0 4px 16px rgba(52, 58, 64, 0.3);
}

.lotto-ball.range-21-30 { 
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    box-shadow: 0 4px 16px rgba(73, 80, 87, 0.3);
}

.lotto-ball.range-31-40 { 
    background: linear-gradient(135deg, #6c757d 0%, #868e96 100%);
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.3);
}

.lotto-ball.range-41-45 { 
    background: linear-gradient(135deg, #868e96 0%, #adb5bd 100%);
    box-shadow: 0 4px 16px rgba(134, 142, 150, 0.3);
}

/* 보너스 번호 스타일 */
.bonus-ball {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%) !important;
    border: 3px solid var(--white);
    box-shadow: 0 0 32px rgba(26, 26, 26, 0.4) !important;
    position: relative;
}

.bonus-ball::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

/* 애니메이션 */
@keyframes ballAppear {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(90deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 번호 컨테이너 */
.number-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 16px;
    margin: 20px 0;
}

/* 버튼 스타일 */
.btn {
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

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

.btn-primary:hover {
    background: var(--secondary-black);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-medium);
}

.btn-secondary {
    background: var(--medium-gray);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--dark-gray);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-medium);
}

/* 로딩 스피너 */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 3px;
    border-color: var(--medium-gray);
    border-right-color: transparent;
}

/* 당첨 번호 표시 */
.winning-numbers {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.winning-numbers::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.05) 50%, transparent 60%);
    animation: shimmer 3s ease-in-out infinite;
}

.winning-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 생성 기록 스타일 */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.history-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.history-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-black);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.history-item:hover::before {
    transform: scaleY(1);
}

.history-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--shadow-medium);
}

.history-timestamp {
    font-size: 0.875rem;
    color: var(--medium-gray);
    margin-bottom: 12px;
    font-weight: 500;
}

/* 전체 기록 섹션 */
.full-width-card {
    grid-column: 1 / -1;
    margin-top: 20px;
}

/* 푸터 스타일 */
footer {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    color: var(--white);
    padding: 40px 0;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* 성공/에러 메시지 */
.success-message {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    color: var(--white);
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid var(--white);
    animation: slideIn 0.5s ease-out;
}

.error-message {
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--medium-gray) 100%);
    color: var(--white);
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid var(--white);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .lotto-ball {
        width: 50px;
        height: 50px;
        font-size: 18px;
        margin: 6px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .history-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 576px) {
    .lotto-ball {
        width: 45px;
        height: 45px;
        font-size: 16px;
        margin: 4px;
    }
    
    .card-header {
        padding: 20px;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .number-container {
        padding: 15px;
        gap: 8px;
    }
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--medium-gray);
    border-radius: 4px;
}

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

/* 선택 영역 스타일 */
::selection {
    background: var(--primary-black);
    color: var(--white);
}

/* 포커스 아웃라인 */
*:focus {
    outline: 2px solid var(--primary-black);
    outline-offset: 2px;
}

/* 텍스트 스타일 */
.text-muted {
    color: var(--medium-gray) !important;
}

.text-primary {
    color: var(--primary-black) !important;
}

/* 플러스 아이콘 스타일 */
.plus-icon {
    color: var(--medium-gray);
    font-size: 24px;
    font-weight: bold;
}

/* 카드 그룹 스타일 */
.card-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
} 

/* 로또 공식 알록달록 색상 (당첨번호용) */
.lotto-color-yellow { background: linear-gradient(135deg, #ffe066 0%, #fbc400 100%) !important; color: #222 !important; }
.lotto-color-blue   { background: linear-gradient(135deg, #5bc0f7 0%, #3c5bc6 100%) !important; color: #fff !important; }
.lotto-color-red    { background: linear-gradient(135deg, #ff7675 0%, #e8211f 100%) !important; color: #fff !important; }
.lotto-color-black  { background: linear-gradient(135deg, #757575 0%, #424242 100%) !important; color: #fff !important; }
.lotto-color-green  { background: linear-gradient(135deg, #a8e063 0%, #32a13a 100%) !important; color: #fff !important; }
.lotto-color-orange { background: linear-gradient(135deg, #ffd180 0%, #ff8200 100%) !important; color: #fff !important; }

/* 메인 타이틀 흰색 */
.lotto-main-title {
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
} 