/* --- [폰트 및 변수 설정] --- */
@font-face {
    font-family: 'DosMyungjo';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-5@1.0/HakgyoansimByeolbichhaneulTTF-L.woff2') format('woff');
    font-weight: normal;
    font-display: swap;
}

i.fa-solid, i.fa-regular {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}

:root {
    --bg-body: #0f172a;
    --bg-solid: #1e293b; 
    --bg-solid-hover: #334155;
    --border-glass: rgba(255, 255, 255, 0.08);
    --primary-accent: #38bdf8;
    --secondary-accent: #a855f7;
    --text-main: #f8fafc;
    --text-sub: #94a3b8;
    --bg-card: #1e293b; 
    
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
}

/* --- [기본 레이아웃 Reset] --- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.08) 0%, transparent 25%);
    background-attachment: fixed;
}

a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
button { cursor: pointer; border: none; font-family: inherit; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 24px 60px 24px;
}

/* --- [상단 플로팅 바] --- */
.floating-bar-style {
    position: fixed;
    top: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    height: 50px;
    background: var(--bg-solid);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}

.floating-bar-style:hover {
    background: var(--bg-solid-hover);
    transform: translateY(2px);
    border-color: rgba(255,255,255,0.2);
}

/* --- [헤더 레이아웃] --- */
header {
    margin-bottom: 25px;
    position: relative;
    z-index: 10;
}

.header-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 75px;
    position: relative;
}

/* --- [사이드 위젯] --- */
.info-widget {
    width: 250px;
    height: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.info-widget:hover {
    transform: translateY(-5px);
    background: var(--bg-solid-hover);
    border-color: rgba(255,255,255,0.2);
}

.widget-thumbnail-zone {
    width: 100%;
    height: 130px;
    background: #000;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-text-zone {
    flex: 1;
    background: var(--bg-solid);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px 12px;
    text-align: center;
}

.widget-main-text { font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; color: #fff; }
.widget-sub-text { font-size: 0.8rem; color: var(--text-sub); }

.widget-video-iframe {
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    transform: translate(-50%, -50%) scale(1.1);
    pointer-events: none;
}

.video-overlay-link {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 20;
    background: transparent;
    cursor: pointer;
}

.safety-display-area {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}
        
.safety-text {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    word-break: keep-all;
    animation: fadeInText 0.5s ease;
}

.clock-display-area {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    font-family: 'DosMyungjo', serif;
}

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

/* 중앙 타이틀 및 검색 */
.header-center {
    flex: 1;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 { margin: 0 0 13px 0; text-align: center; }

.title-brand {
    font-family: 'DosMyungjo', serif;
    font-size: 3rem;
    padding-bottom: 0.1em;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa 0%, #a855f7 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    line-height: 1;
    margin-bottom: 0px;
}

.title-sub {
    font-size: 1.1rem;
    color: var(--text-sub);
    font-weight: 400;
    display: block;
    line-height: 2;
    letter-spacing: 0px;
}

.search-container {
    display: flex;
    gap: 10px;
    width: 100%;
    position: relative;
}

#searchInput {
    flex: 1;
    height: 56px;
    padding: 0 24px;
    border-radius: var(--radius-md);
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-solid);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

#searchInput:focus {
    background: #0f172a;
    border-color: var(--primary-accent);
    outline: 2px solid var(--primary-accent);
    outline-offset: 1px;
}

.random-btn {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.random-btn:hover {
    transform: rotate(15deg) scale(1.1);
}

/* --- [카테고리] --- */
.category-scroll-mask {
    margin-top: 30px;
    position: relative;
    overflow: visible;
}

.category-container {
    display: flex;
    flex-wrap: wrap;       
    justify-content: center; 
    gap: 9px;              
    padding: 10px 0;        
    overflow-x: visible;   
}
.category-container::-webkit-scrollbar { display: none; }

.cat-btn {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    border-radius: 50px;
    background: var(--bg-solid);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-sub);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;    
}

.cat-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateY(-2px);
}

.cat-btn.active {
    background: var(--btn-color); 
    color: white;
    font-weight: 700;
    border-color: transparent;
}

.cat-btn.active::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    animation: shine 3s infinite;
}
@keyframes shine { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }

.cat-icon { filter: grayscale(1); transition: filter 0.3s; }
.cat-btn.active .cat-icon, .cat-btn:hover .cat-icon { filter: grayscale(0); }

/* --- [교과 단원 선택 스타일 추가] --- */
.curriculum-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    animation: fadeIn 0.3s ease;
    background: var(--bg-solid);
    border-radius: var(--radius-md);
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.05);
}
.curr-selector {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    max-width: 100%;
    padding: 5px 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: center;
}
.curr-selector::-webkit-scrollbar { display: none; }
        
.curr-btn {
    padding: 8px 10px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-sub);
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}
.curr-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
.curr-btn.active {
    background: var(--primary-accent);
    color: #1e293b;
    font-weight: 700;
    border-color: transparent;
}
.unit-list .curr-btn.active {
    background: #f472b6; 
}

/* --- [게임 그리드] --- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px; 
    padding-bottom: 20px; 
}

.game-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    transform: translateZ(0);
}

.game-card:hover {
    transform: translateY(-12px) scale(1.02);
    z-index: 5;
    border-color: rgba(255,255,255,0.2);
}

.card-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #1e293b;
    position: relative;
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, opacity 0.5s ease;
}
.game-card img.lazy-thumb:not(.loaded) {
    opacity: 0;
}
.game-card img.lazy-thumb.loaded {
    opacity: 1;
}

.game-card:hover img { transform: scale(1.1); }

.badge {
    position: absolute;
    top: 10px; left: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    z-index: 2;
}
.badge-best { background: #fbbf24; color: #1e293b; }
.badge-new { background: #34d399; color: #064e3b; }

.card-info {
    padding: 16px 20px;
    background: var(--bg-solid);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4; 
    -webkit-box-orient: vertical;
    white-space: normal; 
    word-break: keep-all; 
    transition: font-size 0.2s;
}
.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    color: var(--text-sub);
}
.no-results-icon { font-size: 3rem; margin-bottom: 10px; display: block; }

.game-card.card-type-sm {
    background: linear-gradient(160deg, #2e1065 0%, #0f172a 100%);
}
.game-card.card-type-sm .card-info {
    background: rgb(32 56 111);
}

/* --- [로딩 스피너] --- */
#loadingSpinner {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    z-index: 9999; pointer-events: none;
    transition: opacity 0.5s;
}
.spinner {
    width: 30px; height: 30px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-text { font-size: 0.75rem; letter-spacing: 2px; color: var(--text-sub); }
.loading-hidden { opacity: 0; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.mobile-section-header {
    grid-column: 1 / -1;
    margin-top: 0px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.mobile-section-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

/* ========================================= */
/* [반응형 미디어 쿼리] */
/* ========================================= */
        
@media (max-width: 1024px) {
    .info-widget { display: none; } 
}

@media (max-width: 768px) {
    .container { padding-top: 80px; padding-left: 20px; padding-right: 20px; }
            
    .header-row { flex-direction: column; gap: 20px; }
    .header-center { width: 100%; }

    .title-brand { font-size: 2.4rem; }
    .title-sub { display: none; }
    #currentFlag { margin-right: 6px; }

    #searchInput { height: 50px; font-size: 16px; }
    .random-btn { width: 50px; height: 50px; font-size: 1.5rem; }

    .floating-bar-style {
        top: 10px;
        height: 40px;
        padding: 0 12px !important;
        background: #0f172a !important;
    }
    .curr-selector {
        justify-content: flex-start;
        padding: 5px 20px;
    }

    #langTriggerBtn { left: 16px !important; }
    #infoTriggerBtn { right: 16px !important; }
    #currentLangName { display: none; } 

    .category-container {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 10px 20px;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    .category-scroll-mask { mask-image: none; -webkit-mask-image: none; overflow: visible; }

    .game-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 16px;
        padding-bottom: 60px;
    }

    .card-info { padding: 12px; }
    .card-title { font-size: 0.95rem; }
    .card-meta span { font-size: 0.75rem; }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ========================================= */
/* [독립된 다국어 모달 및 UI 전용 CSS] */
/* ========================================= */
#langModal, #langModal * {
    box-sizing: border-box !important;
    font-family: 'Poppins', 'Noto Sans KR', sans-serif;
}
#langModal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#langModal.active {
    opacity: 1; visibility: visible;
}
.lang-modal-content {
    background: #111827; border: 1px solid #374151; border-radius: 16px;
    width: 90%; max-width: 800px; max-height: 85vh; display: flex; flex-direction: column;
    transform: scale(0.95) translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
#langModal.active .lang-modal-content {
    transform: scale(1) translateY(0);
}
.lang-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid #1f2937; background: #111827;
}
.lang-modal-title {
    color: white; font-size: 1.25rem; font-weight: 700; margin: 0; display:flex; align-items:center; gap:8px;
}
.lang-modal-close {
    background: #1f2937; color: #9ca3af; border: none; width: 40px; height: 40px;
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s; font-size: 1.2rem;
}
.lang-modal-close:hover {
    background: #374151; color: white;
}
.lang-modal-search {
    padding: 16px 20px 8px 20px; position: relative; background: #111827;
}
.lang-modal-search input {
    width: 100%; background: #1f2937; border: 1px solid #374151; color: white;
    padding: 14px 14px 14px 44px; border-radius: 12px; font-size: 0.95rem; outline: none;
    transition: all 0.2s;
}
.lang-modal-search input:focus {
    border-color: #eab308; outline: 1px solid #eab308;
}
.lang-modal-search i {
    position: absolute; left: 36px; top: 50%; color: #9ca3af; transform: translateY(-3px); font-size: 1rem;
}
.lang-modal-body {
    padding: 16px 20px 20px 20px; overflow-y: auto; flex: 1; background: #111827;
}
.lang-modal-body::-webkit-scrollbar { width: 8px; }
.lang-modal-body::-webkit-scrollbar-track { background: #1f2937; border-radius: 4px; }
.lang-modal-body::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 4px; }
.lang-modal-body::-webkit-scrollbar-thumb:hover { background: #6b7280; }

.lang-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px;
}
.lang-item {
    display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px;
    background: #1f2937; border: 1px solid #374151; cursor: pointer;
    transition: all 0.2s; position: relative; overflow: hidden;
}
.lang-item:hover {
    background: #374151; border-color: #6b7280;
}
.lang-item.selected {
    background: #1f2937; border-color: #eab308;
}
.lang-flag {
    width: 36px; height: 26px; border-radius: 4px; object-fit: cover;
    transition: transform 0.3s;
}
.lang-item:hover .lang-flag { transform: scale(1.1); }
.lang-text {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start;
}
.lang-name {
    color: white; font-size: 0.9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;
}
.lang-item.selected .lang-name { color: #facc15; }
.lang-en-name {
    color: #9ca3af; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;
}
.lang-check {
    color: #eab308; font-size: 1.1rem; display: none; margin-left: auto;
}
.lang-item.selected .lang-check { display: block; }
.lang-no-result {
    display: none; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 0; color: #6b7280; text-align: center;
}
.lang-no-result.active { display: flex; }

/* 토스트 메시지 CSS */
#langToast {
    position: fixed; bottom: 24px; right: 24px; background: #1f2937; border: 1px solid #374151;
    border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 12px;
    z-index: 99999;
    transform: translateY(100px); opacity: 0; transition: all 0.3s ease;
    box-sizing: border-box !important;
}
#langToast.show {
    transform: translateY(0); opacity: 1;
}
.toast-icon {
    width: 32px; height: 32px; border-radius: 50%; background: rgba(34, 197, 94, 0.2);
    color: #4ade80; display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.toast-text { display: flex; flex-direction: column; }
.toast-msg { color: white; font-size: 0.9rem; font-weight: 500; margin: 0; }
.toast-lang { color: #9ca3af; font-size: 0.75rem; margin: 0; }

/* 기존 배너 스타일 */
.flashy-banner { 
  display: block; 
  width: 100%; 
  margin: 20px 0 10px 0; 
  padding: 7px; 
  background: linear-gradient(90deg, #38bdf8, #a855f7, #f472b6, #38bdf8); 
  background-size: 300% 100%; 
  border-radius: 50px; 
  color: #fff; 
  font-size: 1.1rem; 
  font-weight: 700; 
  text-align: center; 
  animation: banner-scroll 4s linear infinite; 
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); 
  word-break: keep-all; 
  text-decoration: none;
}

.flashy-banner:hover { 
  transform: scale(1.02); 
  color: #fff; 
}

@keyframes banner-scroll { 
  0% { background-position: 0% 0; } 
  100% { background-position: 300% 0; } 
}

@media (max-width: 768px) { 
  .flashy-banner { 
    display: none; 
  } 
}

/* ========================================= */
/* [랜덤 번호 뽑기 모달 전용 스타일] */
/* ========================================= */
.raffle-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    z-index: 99999; 
    display: flex; 
    align-items: flex-end;
    justify-content: flex-end;
    padding: 24px 24px 90px 24px;
    opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box; font-family: 'Poppins', 'Noto Sans KR', sans-serif;
}

.raffle-modal * { box-sizing: border-box; }
.raffle-modal.active { opacity: 1; visibility: visible; }

.raffle-modal-content {
    background: #1e293b; border: 1px solid #374151; border-radius: 16px;
    width: 90%; max-width: 400px; display: flex; flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); 
    transform: scale(0.95) translateY(20px);
    transform-origin: bottom right;
    transition: all 0.3s;
}
.raffle-modal.active .raffle-modal-content { transform: scale(1) translateY(0); }

@media (max-width: 768px) {
    .raffle-modal {
        justify-content: center;
        padding: 16px 16px 90px 16px;
    }
    .raffle-modal-content {
        width: 100%;
        max-width: none;
    }
}

.raffle-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #334155;
}
.raffle-modal-title { color: white; font-size: 1.2rem; font-weight: 700; margin: 0; display:flex; align-items:center; gap:8px; }
.raffle-modal-close {
    background: transparent; color: #9ca3af; border: none; font-size: 1.2rem; cursor: pointer;
    transition: color 0.2s;
}
.raffle-modal-close:hover { color: white; }
.raffle-modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.raffle-inputs label {
    display: flex; justify-content: space-between; align-items: center;
    color: #cbd5e1; font-size: 0.95rem; margin-bottom: 10px; font-weight: 500;
}
.stepper-group {
    display: flex; align-items: center; gap: 4px;
}
.step-btn {
    background: #334155; color: #cbd5e1; border: none; padding: 6px 8px; border-radius: 6px; 
    cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: background 0.2s;
}
.step-btn:hover { background: #475569; color: white; }
.raffle-inputs input {
    width: 55px; padding: 8px 4px; border-radius: 8px; border: 1px solid #475569;
    background: #0f172a; color: white; text-align: center; font-size: 1rem; font-weight: 600; outline: none;
}

.raffle-inputs input[type="number"]::-webkit-outer-spin-button,
.raffle-inputs input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.raffle-inputs input[type="number"] {
    -moz-appearance: textfield;
}

.raffle-inputs input:focus { border-color: #38bdf8; }
.raffle-action { display: flex; gap: 10px; }
.draw-btn {
    flex: 1; padding: 12px; border-radius: 12px; background: linear-gradient(135deg, #f472b6, #a855f7);
    color: white; font-weight: 700; font-size: 1.1rem; border: none; cursor: pointer; transition: transform 0.2s;
}
.draw-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(244, 114, 182, 0.4); }
.reset-btn {
    padding: 12px 16px; border-radius: 12px; background: #334155; color: #cbd5e1; font-weight: 600;
    border: none; cursor: pointer; transition: background 0.2s;
}
.reset-btn:hover { background: #475569; color: white; }
.raffle-message {
    color: #fb7185; font-size: 0.9rem; font-weight: 600; text-align: center;
    min-height: 20px; margin-top: -8px; margin-bottom: 4px; opacity: 0; transition: opacity 0.3s ease;
}
.raffle-message.show { opacity: 1; }
        
.raffle-result {
    min-height: 80px; background: #0f172a; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    border: 1px dashed #475569; padding: 10px; text-align: center; font-size: 2.2rem; font-weight: 800;
    flex-wrap: wrap; gap: 10px;
}
.raffle-result .placeholder { font-size: 0.9rem; color: #64748b; font-weight: 400; }
.raffle-history h3 { font-size: 0.9rem; color: #94a3b8; margin: 0 0 8px 0; border-bottom: 1px solid #334155; padding-bottom: 4px; }
.history-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
.history-item { background: #334155; color: #cbd5e1; padding: 4px 8px; border-radius: 6px; font-size: 0.85rem; font-weight: 600; }

#raffleTriggerBtn:hover {
    background: rgba(51, 65, 85, 0.85) !important;
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.2) !important;
}

@media (max-width: 1024px) {
    #raffleTriggerBtn { bottom: 24px !important; }
}

/* ========================================= */
/* [랜덤 번호 뽑기 하단 플로팅 버튼 강조] */
/* ========================================= */
#raffleTriggerBtn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99998;
    padding: 16px 28px;
    background: linear-gradient(135deg, #f472b6, #a855f7);
    border: none;
    border-radius: 50px;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(244, 114, 182, 0.4), 0 0 0 0 rgba(244, 114, 182, 0.7);
    animation: pulse-raffle 2s infinite cubic-bezier(0.66, 0, 0, 1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#raffleTriggerBtn i {
    color: #fff;
    font-size: 1.5rem;
    margin-right: 10px;
}

#raffleTriggerBtn span {
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#raffleTriggerBtn:hover {
    transform: translateY(-5px) scale(1.05);
    background: linear-gradient(135deg, #ec4899, #9333ea);
    box-shadow: 0 10px 25px rgba(244, 114, 182, 0.6);
    animation: none;
}

@keyframes pulse-raffle {
    to {
        box-shadow: 0 4px 15px rgba(244, 114, 182, 0.4), 0 0 0 20px rgba(244, 114, 182, 0);
    }
}

@media (max-width: 1024px) {
    #raffleTriggerBtn {
        bottom: 24px !important;
        padding: 12px 20px;
    }
    #raffleTriggerBtn span {
        font-size: 1.1rem;
    }
    #raffleTriggerBtn i {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    #raffleTriggerBtn {
        display: none !important;
    }
}