﻿/* cal7.css - 로또번호 생성기 스타일 */
.header {
    position: relative;
    background-color: #0078d7;
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .header h1 {
        margin: 0;
        font-size: 28px;
        font-weight: 600;
    }

.home-button {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

    .home-button:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    .home-button svg {
        width: 18px;
        height: 18px;
    }

.content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.description {
    text-align: center;
    margin-bottom: 20px;
    font-size: 16px;
}

.subtitle {
    font-size: 14px;
    color: #666;
    display: block;
    margin-top: 5px;
}

/* 모드 선택 영역 */
.mode-selection {
    margin-bottom: 20px;
}

.mode-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mode-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    background-color: #e0e0e0;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 120px;
    max-width: 200px;
}

    .mode-btn:hover {
        background-color: #d0d0d0;
    }

    .mode-btn.active {
        background-color: #0078d7;
        color: white;
    }

/* 번호 선택 패널 */
.number-selection-panel {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

    .selection-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
    }

.small-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background-color: transparent;
    color: #dc3545;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .small-btn:hover {
        background-color: rgba(220, 53, 69, 0.1);
    }

.number-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 6px;
    margin-bottom: 15px;
}

.number-ball {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .number-ball:hover {
        background-color: #d0d0d0;
    }

    .number-ball.selected {
        color: white;
        font-weight: 600;
    }

.selection-info {
    font-size: 14px;
    color: #666;
}

/* 번호 색상 클래스 */
.ball-1-10 {
    background-color: #ffc107 !important;
}

.ball-11-20 {
    background-color: #2196f3 !important;
}

.ball-21-30 {
    background-color: #f44336 !important;
}

.ball-31-40 {
    background-color: #455a64 !important;
}

.ball-41-45 {
    background-color: #4caf50 !important;
}

/* 번호 디스플레이 수정 - 한 줄에 3개씩 표시 */
.numbers-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.number-display {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 140px; /* 높이 증가 - 2줄 표시를 위해 */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.empty-text {
    grid-column: span 3;
    text-align: center;
}

.lotto-ball {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 22px;
    font-weight: 600;
}

/* 생성 버튼 */
.generate-button-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.generate-btn {
    padding: 15px 40px;
    border: none;
    border-radius: 6px;
    background-color: #0078d7;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 250px;
}

    .generate-btn:hover {
        background-color: #005bb5;
    }

    .generate-btn.loading {
        position: relative;
        color: transparent;
    }

        .generate-btn.loading::after {
            content: "";
            position: absolute;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 1s linear infinite;
            left: calc(50% - 10px);
            top: calc(50% - 10px);
        }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 히스토리 섹션 */
.history-section {
    margin-bottom: 30px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

    .history-header h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 600;
    }

.history-container {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.history-item {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

    .history-item:last-child {
        margin-bottom: 0;
    }

.history-ball {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.empty-history {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* 공유 및 다운로드 버튼 */
.share-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.share-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.excel-btn {
    background-color: #217346;
    color: white;
}

    .excel-btn:hover {
        background-color: #195a35;
    }

    .excel-btn::before {
        content: "";
        display: inline-block;
        width: 18px;
        height: 18px;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="8" y1="13" x2="16" y2="13"></line><line x1="8" y1="17" x2="16" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>');
        background-repeat: no-repeat;
        background-size: contain;
    }

.kakao-btn {
    background-color: #FEE500;
    color: #000000;
}

    .kakao-btn:hover {
        background-color: #E6CF00;
    }

    .kakao-btn::before {
        content: "";
        display: inline-block;
        width: 18px;
        height: 18px;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 208 191"><path fill="black" d="M104,0C46.56,0,0,36.71,0,82c0,29.28,19.47,55,48.75,69.48-1.59,5.49-10.24,35.34-10.58,37.69,0,0-.21,1.76.93,2.43a3.14,3.14,0,0,0,2.48.15c3.28-.46,38.21-25.57,44.09-29.86,6,.67,12.09,1.06,18.33,1.06,57.44,0,104-36.71,104-82S161.44,0,104,0Z"/></svg>');
        background-repeat: no-repeat;
        background-size: contain;
    }

/* 애니메이션 효과 */
@keyframes appear {
    0% {
        transform: scale(0.3);
        opacity: 0;
        filter: blur(5px);
    }

    50% {
        transform: scale(1.3);
        opacity: 1;
        filter: blur(0);
    }

    70% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1.05);
    }
}

.ball-appear {
    animation: appear 0.6s ease-out forwards;
}

/* 사업자 등록번호 스타일 */
.business-number {
    font-size: 11px;
    color: #999;
    opacity: 0.7;
    margin-top: 2px;
}

/* ===== 슬라이딩 배너 스타일 ===== */
.sliding-banner-area {
    position: relative;
    margin: 40px auto;
    width: 320px;
    height: 200px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    max-width: 600px;
}

.banner-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
}

.banner-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
    z-index: 1;
}

.sliding-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    text-align: center;
    /* 부드러운 슬라이딩 애니메이션 */
    animation: smoothSliding 5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

    .sliding-cover:hover {
        animation-play-state: paused;
    }

.cover-content {
    pointer-events: none;
}

.cover-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.cover-subtitle {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.slide-hint {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 11px;
    backdrop-filter: blur(10px);
    animation: gentleBlink 3s ease-in-out infinite;
}

.arrow-indicator {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: softPulse 2.5s ease-in-out infinite;
}

    .arrow-indicator::after {
        content: '→';
        color: white;
        font-weight: bold;
        font-size: 16px;
    }

.banner-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.blog-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: subtleGlow 4s ease-in-out infinite;
}

.blog-description {
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.95;
    margin-bottom: 15px;
}

.blog-tag {
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    backdrop-filter: blur(10px);
    animation: gentleBounce 3s ease-in-out infinite;
}

/* 부드러운 슬라이딩 애니메이션 */
@keyframes smoothSliding {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-10px);
    }

    40% {
        transform: translateX(-40px);
    }

    60% {
        transform: translateX(-70px);
    }

    80% {
        transform: translateX(-30px);
    }

    100% {
        transform: translateX(0);
    }
}

/* 부드러운 깜빡임 */
@keyframes gentleBlink {
    0%, 70% {
        opacity: 0.8;
    }

    35% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* 부드러운 펄스 */
@keyframes softPulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-50%) scale(1.1);
        opacity: 1;
    }
}

/* 부드러운 글로우 효과 */
@keyframes subtleGlow {
    0%, 100% {
        text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }

    50% {
        text-shadow: 0 2px 6px rgba(255,255,255,0.2), 0 0 15px rgba(255,255,255,0.1);
    }
}

/* 부드러운 바운스 */
@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

/* 호버시 더 부드럽게 */
.sliding-banner-area:hover .sliding-cover {
    animation: smoothSliding 7s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

/* 클릭 효과 - 부드럽게 */
.sliding-cover:active {
    transform: translateX(-100%) !important;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    animation: none !important;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .content {
        padding: 15px;
    }

    .mode-buttons {
        flex-direction: column;
        align-items: center;
    }

    .mode-btn {
        width: 100%;
        max-width: none;
    }

    .number-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .number-display {
        min-height: 130px;
        padding: 15px 10px;
    }

    .numbers-container {
        max-width: 250px;
        gap: 10px;
    }

    .lotto-ball {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .generate-btn {
        width: 100%;
    }

    .share-container {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
    }

    /* 슬라이딩 배너 모바일 반응형 */
    .sliding-banner-area {
        width: 280px;
        height: 180px;
        margin: 30px auto;
    }

    .cover-title {
        font-size: 16px;
    }

    .cover-subtitle {
        font-size: 12px;
    }

    .blog-title {
        font-size: 18px;
    }

    .blog-description {
        font-size: 13px;
    }

    .slide-hint {
        font-size: 10px;
        padding: 4px 8px;
    }

    .arrow-indicator {
        width: 25px;
        height: 25px;
        right: 15px;
    }

        .arrow-indicator::after {
            font-size: 14px;
        }

    /* 모바일에서 더욱 부드러운 애니메이션 */
    @keyframes smoothSliding {
        0% {
            transform: translateX(0);
        }

        25% {
            transform: translateX(-8px);
        }

        50% {
            transform: translateX(-35px);
        }

        75% {
            transform: translateX(-55px);
        }

        100% {
            transform: translateX(0);
        }
    }
}

@media (max-width: 360px) {
    .numbers-container {
        max-width: 220px;
        gap: 8px;
    }

    .lotto-ball {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
}
