@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&family=Jua&display=swap');

:root {
    --bg-color: #1a1a2e;
    --panel-color: #1f1f3a;
    --primary-color: #00f5d4; /* 민트색 네온 */
    --secondary-color: #ff00e5; /* 핑크색 네온 */
    --text-color: #e0e0e0;
    --text-muted-color: #a0a0a0;
    --border-color: #3a3a5a;
}

* { box-sizing: border-box; }

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    overflow-x: hidden;
}

.home-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 0 15px var(--primary-color), 0 0 20px var(--secondary-color);
    z-index: 1001;
    transition: all 0.3s ease;
}

.home-btn:hover { transform: scale(1.1); }

.main-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 25px;
    width: 100%;
    max-width: 1400px;
    align-items: flex-start;
}

.container { text-align: center; }

header h1 {
    font-family: 'Jua', sans-serif;
    font-size: 2.8em;
    color: var(--primary-color);
    margin: 0 0 5px 0;
    text-shadow: 0 0 10px var(--primary-color);
}

.sub-header { margin: 0 0 20px 0; color: var(--secondary-color); font-size: 1.2em; font-weight: 700; }

.roulette-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

#rouletteCanvas { width: 100%; height: auto; }

.pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid var(--secondary-color);
    filter: drop-shadow(0 0 5px var(--secondary-color));
}

.controls { margin-top: 20px; }

#spinButton { font-size: 1.5em; padding: 15px 30px; background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); color: white; box-shadow: 0 0 15px var(--primary-color); }
#spinButton:hover { transform: translateY(-2px); box-shadow: 0 0 25px var(--primary-color); }
#spinButton:disabled { background: #555; color: #888; box-shadow: none; cursor: not-allowed; }

#result { margin-top: 15px; font-size: 1.4em; font-weight: bold; min-height: 2em; }

.side-panel { background-color: var(--panel-color); border: 1px solid var(--border-color); border-radius: 15px; padding: 25px; }

.side-panel h2 { font-family: 'Jua', sans-serif; font-size: 1.6em; color: var(--text-color); border-bottom: 2px solid var(--border-color); padding-bottom: 10px; margin: 0 0 20px 0; }

.item-input-group { display: flex; gap: 10px; margin-bottom: 15px; }

#newItemInput { flex-grow: 1; min-width: 0; padding: 12px; border: 1px solid var(--border-color); background-color: var(--bg-color); color: var(--text-color); border-radius: 5px; font-size: 1em; }
#newItemInput:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 10px var(--primary-color); }

#addButton { background-color: var(--primary-color); color: var(--bg-color); font-size: 1.2em; padding: 0 15px; }

.options { margin-bottom: 15px; }

#itemList { max-height: 200px; overflow-y: auto; padding-right: 10px; }
.item-tag { background-color: var(--bg-color); padding: 10px; border-radius: 5px; margin-bottom: 8px; border-left: 4px solid var(--primary-color); display: flex; justify-content: space-between; align-items: center; }
.item-tag.drawn { opacity: 0.5; text-decoration: line-through; }

.delete-btn { background: transparent; color: var(--text-muted-color); border: none; font-size: 1.1em; cursor: pointer; transition: all 0.3s; }
.delete-btn:hover { color: var(--secondary-color); transform: scale(1.2); }

.list-actions, .history-container { margin-top: 20px; }
.list-actions button, #clearHistoryButton { width: 100%; background-color: #3a3a5a; color: var(--text-color); margin-top: 10px; border: 1px solid var(--border-color); }
.list-actions button:hover, #clearHistoryButton:hover { background-color: var(--secondary-color); border-color: var(--secondary-color); box-shadow: 0 0 10px var(--secondary-color); }

#historyList { max-height: 150px; overflow-y: auto; padding-right: 10px; }
#historyList div { background-color: var(--bg-color); padding: 8px; border-radius: 5px; margin-bottom: 5px; border-left: 4px solid var(--secondary-color); }

i { margin-right: 8px; }

/* 반응형 */
@media (max-width: 992px) {
    .main-wrapper { grid-template-columns: 1fr; }
    .side-panel { margin-top: 25px; }
}

@media (max-width: 768px) {
    body { padding: 10px; }
    header h1 { font-size: 2em; }
    .home-btn { top: 10px; left: 10px; padding: 8px 12px; font-size: 0.9em; }
}
