/* Modern AI Lotto Style */

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #10b981, #3b82f6);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #059669, #2563eb);
}

/* AI Robot Logo Animations */
.ai-robot-logo {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.robot-eye-left, .robot-eye-right {
    animation: eyeBlink 4s ease-in-out infinite;
}

@keyframes eyeBlink {
    0%, 96%, 100% {
        opacity: 1;
    }
    98% {
        opacity: 0.2;
    }
}

.robot-chest {
    animation: chestGlow 2s ease-in-out infinite;
}

@keyframes chestGlow {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.7;
        filter: brightness(1.5);
    }
}

.ai-logo-text {
    animation: logoShine 3s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3),
                 0 0 20px rgba(59, 130, 246, 0.2);
}

@keyframes logoShine {
    0%, 100% {
        text-shadow: 0 0 10px rgba(16, 185, 129, 0.3),
                     0 0 20px rgba(59, 130, 246, 0.2);
    }
    50% {
        text-shadow: 0 0 20px rgba(16, 185, 129, 0.6),
                     0 0 40px rgba(59, 130, 246, 0.4),
                     0 0 60px rgba(16, 185, 129, 0.2);
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* Lotto Ball Styles - Modern Colors */
.lotto-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: fadeInUp 0.6s ease-out;
    color: white;
}

.lotto-ball::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 15%;
    width: 30%;
    height: 30%;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    filter: blur(5px);
}

.lotto-ball.range-1-10 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.lotto-ball.range-11-20 {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.lotto-ball.range-21-30 {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.lotto-ball.range-31-40 {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.lotto-ball.range-41-45 {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* 로또 공 색상 클래스 (번호별) */
.lotto-ball.ball-yellow {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.lotto-ball.ball-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.lotto-ball.ball-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.lotto-ball.ball-gray {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.lotto-ball.ball-green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.lotto-ball.ball-bonus {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    border: 3px solid #fbbf24;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

.bonus-ball {
    border: 3px solid #fbbf24;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

/* Card Hover Effects */
.analysis-card {
    transform: translateY(0);
    transition: all 0.3s ease;
}

.analysis-card:hover {
    transform: translateY(-10px);
}

/* Button Effects */
.generate-btn {
    position: relative;
    overflow: hidden;
}

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

.generate-btn:active::before {
    width: 300px;
    height: 300px;
}

/* Loading Animation */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

/* Recent Draw Item */
.recent-draw-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease-out;
}

.recent-draw-item:hover {
    background: #f3f4f6;
    border-color: #10b981;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.recent-draw-item .draw-number {
    font-family: 'Orbitron', sans-serif;
    color: #10b981;
    font-weight: bold;
}

.recent-draw-item .draw-date {
    color: #6b7280;
    font-size: 0.75rem;
}

.recent-draw-item .mini-ball {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-center;
    font-size: 13px;
    font-weight: bold;
    margin: 0 2px;
    font-family: 'Orbitron', sans-serif;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Chart Container */
canvas {
    max-height: 100% !important;
}

/* Ad Banner Styles */
.ad-banner {
    transition: all 0.3s ease;
}

.ad-banner:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    animation: fadeInUp 0.5s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Number Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.count-up {
    animation: countUp 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lotto-ball {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .mini-ball {
        width: 28px !important;
        height: 28px !important;
        font-size: 11px !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    /* 결과 페이지 모바일 최적화 */
    #result-section .glass-effect {
        padding: 1rem !important;
    }
    
    #result-section h3 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    #result-section .text-3xl {
        font-size: 1.5rem !important;
    }
    
    /* 분석 근거 섹션 컴팩트화 */
    #result-section .bg-gradient-to-r {
        padding: 0.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    #result-section .bg-gradient-to-r h4 {
        font-size: 0.875rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    #result-section .bg-gradient-to-r p {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
    }
    
    /* 버튼 영역 컴팩트화 */
    #result-section .flex.justify-center.space-x-4 {
        margin-bottom: 1rem !important;
    }
    
    #result-section button {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    /* 번호 표시 영역 */
    #numbers-display {
        margin-bottom: 1rem !important;
        gap: 0.5rem !important;
    }
    
    /* 스폰서 배너 강조 */
    #sponsor-banner,
    #sponsor-banner-saju {
        border: 2px solid #fbbf24 !important;
        box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3) !important;
        border-radius: 0.75rem !important;
    }
    
    #sponsor-banner:hover,
    #sponsor-banner-saju:hover {
        box-shadow: 0 4px 12px rgba(251, 191, 36, 0.5) !important;
        border-color: #f59e0b !important;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    header, footer, .generate-btn, .ad-banner {
        display: none;
    }
}

/* Gradient Border Effect */
.border-gradient-to-r {
    border-image: linear-gradient(to right, #10b981, #3b82f6) 1;
}

/* Shine Effect for Premium Elements */
@keyframes shine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.shine {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    background-size: 200% auto;
    animation: shine 3s linear infinite;
}

/* ========================================
   🎯 Full-Screen Advertisement Modal Styles
   ======================================== */

/* Ad Modal Container */
#ad-modal {
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Ad Modal Content */
.ad-modal-content {
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Background Gradient Animation */
@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

/* Skip Button Hover Effect */
#ad-skip-btn {
    transform: scale(1);
    transition: all 0.3s ease;
}

#ad-skip-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#ad-skip-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ad Banner Link Hover */
#ad-banner-link {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#ad-banner-link:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Countdown Animation */
#ad-countdown {
    display: inline-block;
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Progress Bar Animation */
#ad-progress {
    transition: width 0.1s linear;
}

/* Responsive Design for Ad Modal */
@media (max-width: 768px) {
    .ad-modal-content {
        padding: 1.5rem !important;
    }
    
    #ad-banner-link img {
        max-width: 100%;
    }
    
    #ad-banner-link .text-2xl {
        font-size: 1.25rem !important;
    }
    
    #ad-banner-link .text-lg {
        font-size: 1rem !important;
    }
}

/* Print: Hide Ad Modal */
@media print {
    #ad-modal {
        display: none !important;
    }
}

/* ========================================
   🎯 Sponsor Banner (YouTube Style)
   ======================================== */

/* Sponsor Banner Animation & Link Styling */
/* 스폰서 배너 - YouTube 스타일 (작고 깔끔한 디자인) */
#sponsor-banner,
#sponsor-banner-saju {
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

#sponsor-banner:hover,
#sponsor-banner-saju:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

/* 스폰서 배지 */
#sponsor-banner .sponsor-badge,
#sponsor-banner-saju .sponsor-badge {
    display: inline-block !important;
    font-size: 0.65rem !important;
    padding: 0.2rem 0.5rem !important;
    font-weight: 900 !important;
}

/* 버튼 호버 효과 */
#sponsor-banner .bg-gray-800:hover,
#sponsor-banner-saju .bg-gray-800:hover {
    background-color: #1f2937;
}

/* 모바일 반응형 - 더 깔끔하고 컴팩트하게 */
@media (max-width: 768px) {
    #sponsor-banner,
    #sponsor-banner-saju {
        padding: 0.5rem !important;
    }
    
    /* 이미지 크기 - 모바일에서 작게 */
    #sponsor-banner img,
    #sponsor-banner-saju img {
        width: 48px !important;
        height: 48px !important;
    }
    
    /* 스폰서 배지 */
    #sponsor-banner .sponsor-badge,
    #sponsor-banner-saju .sponsor-badge {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
    
    /* 제목 텍스트 */
    #sponsor-banner .text-sm,
    #sponsor-banner-saju .text-sm {
        font-size: 12px !important;
    }
    
    /* 버튼 */
    #sponsor-banner .bg-gray-800,
    #sponsor-banner-saju .bg-gray-800 {
        padding: 0.5rem 0.75rem !important;
        font-size: 11px !important;
    }
}

/* Print: Hide Sponsor Banner */
@media print {
    #sponsor-banner,
    #sponsor-banner-saju {
        display: none !important;
    }
}
