/* 기본 배경 설정 */
body {
    background: #2a2a2a !important;
    color: #fff;
}

/* 로또 컨테이너 */
.lotto-container {
    max-width: 900px;
    margin: 50px auto;
    padding: 20px;
    text-align: center;
}

.lotto-title {
    font-size: 48px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-style: italic;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 로또 볼 컨테이너 */
.lotto-balls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    perspective: 1000px;
}

/* 로또 볼 기본 스타일 */
.lotto-ball {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* 로또볼 색상 클래스 */
.ball-yellow {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.ball-blue {
    background: linear-gradient(135deg, #4A90E2, #1E5799);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.ball-red {
    background: linear-gradient(135deg, #FF6B6B, #C0392B);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.ball-gray {
    background: linear-gradient(135deg, #95A5A6, #7F8C8D);
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.4);
}

.ball-green {
    background: linear-gradient(135deg, #2ECC71, #27AE60);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

.ball-orange {
    background: linear-gradient(135deg, #FF8C42, #FF6B35);
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.4);
}

/* 슬롯머신 효과 */
.lotto-ball.slot-spinning {
    animation: slotRotate 0.1s linear infinite;
}

@keyframes slotRotate {
    0% { transform: rotateX(0deg); }
    100% { transform: rotateX(360deg); }
}

.lotto-ball.generated {
    animation: ballBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes ballBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* 모드 선택 버튼 */
.mode-selector {
    margin: 30px 0;
    display: inline-block;
    background: rgba(0,0,0,0.5);
    padding: 5px;
    border-radius: 30px;
}

.mode-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    background: transparent;
    color: #999;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.mode-btn.active {
    background: #7b68ee;
    color: white;
}

/* 생성 버튼 */
.generate-btn {
    padding: 20px 80px;
    font-size: 28px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #ff9500 0%, #ff5e00 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.4);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 149, 0, 0.6);
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 잔액 정보 */
.balance-info {
    margin: 20px 0;
    padding: 20px;
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    color: white;
}

.balance-info p {
    margin: 10px 0;
    font-size: 16px;
}

.balance-info strong {
    color: #ff9500;
    font-size: 20px;
}

.cost-display {
    color: #FFA500;
    font-size: 16px;
    margin: 10px 0;
    text-align: center;
}

/* 결과 섹션 */
.result-section {
    margin-top: 40px;
    padding: 25px;
    background: rgba(0,0,0,0.7);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    color: white;
}

.result-section h3 {
    color: #ff9500;
    margin-bottom: 15px;
    font-size: 24px;
}

.result-section.show {
    animation: slideIn 0.5s ease-out;
}

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

#resultNumbers {
    font-size: 24px;
    color: #fff;
}

/* 내역 보기 링크 */
.history-link {
    margin-top: 40px;
}

.history-link a {
    display: inline-block;
    padding: 12px 30px;
    background: #7b68ee;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
}

.history-link a:hover {
    background: #6c5ce7;
    transform: translateY(-2px);
}

/* 비회원 안내 박스 */
.guest-info-box {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.1), rgba(255, 215, 0, 0.1));
    border: 2px solid #FFA500;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { border-color: #FFA500; }
    50% { border-color: #FFD700; }
}

.guest-info-box p {
    margin: 0;
    color: #fff;
    font-size: 16px;
}

/* 무료체험 완료 메시지 */
.trial-message {
    background: rgba(255, 165, 0, 0.2);
    border: 2px solid #FFA500;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    color: #fff;
    animation: fadeIn 0.5s ease-in;
}

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

.trial-message a {
    color: #FFD700;
    text-decoration: underline;
    font-weight: bold;
}

/* 최근 당첨번호 섹션 */
.recent-draws-section {
    margin-top: 60px;
    padding: 30px;
    background: rgba(0,0,0,0.5);
    border-radius: 15px;
}

.recent-draws-section h3 {
    color: #ff9500;
    font-size: 24px;
    margin-bottom: 30px;
}

.recent-draws-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.draw-item {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 10px;
}

.draw-title {
    color: #fff;
    font-size: 14px;
    margin-bottom: 10px;
}

.draw-balls {
    display: flex;
    justify-content: center;
    gap: 5px;
}

/* 미니볼 스타일 */
.mini-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin: 0 2px;
}

.mini-ball.ball-yellow { background: linear-gradient(135deg, #FFD700, #FFA500); }
.mini-ball.ball-blue { background: linear-gradient(135deg, #4A90E2, #1E5799); }
.mini-ball.ball-red { background: linear-gradient(135deg, #FF6B6B, #C0392B); }
.mini-ball.ball-gray { background: linear-gradient(135deg, #95A5A6, #7F8C8D); }
.mini-ball.ball-green { background: linear-gradient(135deg, #2ECC71, #27AE60); }
.mini-ball.ball-bonus { background: linear-gradient(135deg, #9B59B6, #8E44AD); }

/* 헤더 스타일 */
#hd {
    background: #2a2a2a !important;
}

#hd_wrapper {
    background: #1a1a1a !important;
    height: auto !important;
    padding: 0 !important;
}

#header_top {
    border-bottom: 1px solid #333 !important;
    background: #1a1a1a !important;
}

#header_top .inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

#logo {
    padding: 10px 0 !important;
}

#logo a {
    display: inline-block;
    color: #ff9500 !important;
    font-size: 28px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 1px;
}

/* 사용자 메뉴 */
.member_info {
    display: flex;
    gap: 15px;
    color: #ccc !important;
}

.member_info .user_name {
    color: #fff !important;
}

.member_info strong {
    color: #ff9500 !important;
}

.member_menu a, .login_menu a {
    padding: 8px 15px !important;
    border: 1px solid #444 !important;
    border-radius: 4px !important;
    color: #ccc !important;
    text-decoration: none !important;
    margin-left: 10px;
}

.member_menu a:hover, .login_menu a:hover {
    background: #ff9500 !important;
    border-color: #ff9500 !important;
    color: #fff !important;
}

.btn_admin {
    background: #e74c3c !important;
    border-color: #e74c3c !important;
    color: #fff !important;
}

/* 메인 네비게이션 */
#gnb {
    background: #222 !important;
    border-bottom: 2px solid #ff9500 !important;
}

#gnb_1dul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 1200px;
    margin: 0 auto !important;
}

.gnb_1dli a {
    display: block;
    padding: 15px 20px !important;
    color: #ccc !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.gnb_1dli:hover a,
.gnb_1dli.active a {
    background: #ff9500 !important;
    color: #fff !important;
}

/* 컨텐츠 레이아웃 */
#wrapper .content-wrapper {
    display: flex !important;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#wrapper .content-wrapper .main-area {
    flex: 1;
    min-width: 0;
}

#wrapper .content-wrapper #aside {
    width: 235px;
    flex-shrink: 0;
}

/* 사이드바 스타일 */
#aside .sidebar-box {
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    margin-top: 20px;
}

#aside .sidebar-box h3 {
    color: #ff9500;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff9500;
}

#aside .number-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

#aside .number-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

#aside .number-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

#aside .user-nick {
    color: #fff;
    font-size: 13px;
}

#aside .number-date {
    color: #999;
    font-size: 12px;
}

#aside .number-balls {
    display: flex;
    gap: 3px;
}

#aside .sidebar-box .mini-ball {
    width: 25px !important;
    height: 25px !important;
    font-size: 11px !important;
    line-height: 25px !important;
}

.no-data {
    text-align: center;
    color: #666;
    padding: 20px 0;
}

/* 푸터 스타일 */
#ft {
    background: #1a1a1a !important;
    border-top: 3px solid #ff9500 !important;
    color: #999 !important;
    padding: 30px 0 !important;
    margin-top: 50px !important;
}

#ft_wr {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#ft_company h2 {
    color: #ff9500;
    margin-bottom: 15px;
}

#ft_link a {
    color: #ff9500 !important;
    text-decoration: none;
    margin-right: 15px;
}

#ft_count {
    margin-top: 20px;
    color: #999;
}

#ft_count strong {
    color: #ff9500;
}

/* 반응형 */
@media (max-width: 1024px) {
    .lotto-container {
        padding: 20px;
    }
    
    #wrapper .content-wrapper {
        flex-direction: column !important;
    }
    
    #wrapper .content-wrapper #aside {
        width: 100% !important;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .lotto-title {
        font-size: 32px;
    }
    
    .lotto-balls {
        gap: 10px;
    }
    
    .lotto-ball {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
    
    .generate-btn {
        padding: 15px 50px;
        font-size: 20px;
        width: 90%;
        max-width: 300px;
    }
    
    .recent-draws-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .lotto-ball {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* 사이드바 배경 수정 */
#aside {
    background: rgba(0,0,0,0.3) !important;
    padding: 20px !important;
    border-radius: 10px !important;
}

/* 헤더 정렬 수정 */
#hd_top_menu {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
}

#hd_top_menu .member_info {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
}

#hd_top_menu .member_menu,
#hd_top_menu .login_menu {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* 로그인/회원가입 버튼 정렬 */
.login_menu {
    display: flex !important;
}

.login_menu a {
    display: inline-block !important;
    margin: 0 5px !important;
}

/* 비회원 섹션 타이틀 스타일 추가 */
#aside h2,
#aside h3 {
    color: #ff9500 !important;
    font-size: 18px !important;
    margin-bottom: 15px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #ff9500 !important;
}

/* outlogin 스킨 스타일 */
#aside .ol {
    background: rgba(0,0,0,0.5) !important;
    border-radius: 10px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
}

/* poll 스킨 스타일 */
#aside .poll {
    background: rgba(0,0,0,0.5) !important;
    border-radius: 10px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
}

/* 최근 생성 번호 당첨 정보 스타일 */
.recent-numbers .winning-status {
    color: #999;
    font-size: 11px;
    margin-left: 5px;
    margin-right: 5px;
}

.recent-numbers .number-info {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 12px;
}

.recent-numbers .user-nick {
    font-weight: 500;
    margin-right: 5px;
}

.recent-numbers .number-date {
    margin-left: auto;
    color: #999;
    font-size: 11px;
}