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

body {
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2em;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s;
}

h1:hover {
    opacity: 0.8;
}

#dateText {
    font-size: 1em;
    color: #aaa;
    margin-top: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

#dateText:hover {
    opacity: 0.8;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #45a049;
}

.btn-download {
    background-color: #2196F3;
}

.btn-download:hover {
    background-color: #0b7dda;
}

#captureArea {
    background-color: #1a1a1a;
}

.tier-container {
    margin-bottom: 30px;
}

.tier-row {
    display: flex;
    margin-bottom: 2px;
    background-color: #2a2a2a;
    min-height: 70px;
}

.tier-label {
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: width 0.3s ease;
    overflow: hidden;
}

.tier-label:hover {
    width: 420px;
}

.tier-label-text {
    min-width: 80px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.tier-label input {
    width: 80%;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    padding: 5px;
}

.tier-content {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    align-items: center;
    min-height: 70px;
}

.tier-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.tier-label:hover .tier-controls {
    opacity: 1;
}

.tier-control-btn {
    background: rgba(76, 175, 80, 0.9);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 11px;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.tier-control-btn:hover {
    background: rgba(76, 175, 80, 1);
    transform: scale(1.05);
}

.item {
    width: 60px;
    height: 60px;
    cursor: move;
    border: 2px solid #444;
    border-radius: 5px;
    overflow: visible;
    position: relative;
    background-color: #333;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
}

.item:hover {
    width: 300px;
    z-index: 10;
}

.item-image-container {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
}

.item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    background: rgba(0,0,0,0.8);
    color: white;
    font-size: 9px;
    padding: 2px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item.dragging {
    opacity: 0.5;
}

.item-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.item:hover .item-controls {
    opacity: 1;
}

.item-control-btn {
    background: rgba(33, 150, 243, 0.9);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.item-control-btn:hover {
    background: rgba(33, 150, 243, 1);
    transform: scale(1.05);
}

.item-pool {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 5px;
}

.item-pool h3 {
    margin-bottom: 15px;
}

.item-pool-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 100px;
    padding: 10px;
    background-color: #1a1a1a;
    border-radius: 5px;
}

.tier-content.drag-over,
.item-pool-content.drag-over {
    background-color: #3a3a3a;
    outline: 2px dashed #4CAF50;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #2a2a2a;
    margin: 15% auto;
    padding: 30px;
    border-radius: 10px;
    width: 400px;
    position: relative;
}

.modal-content h2 {
    margin-bottom: 20px;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    color: white;
    border-radius: 5px;
    font-size: 16px;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: white;
}

/* 색상 선택기 */
.color-picker {
    position: absolute;
    top: 100%;
    left: 0;
    background: #2a2a2a;
    padding: 10px;
    border-radius: 5px;
    display: none;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.color-picker input[type="color"] {
    width: 100px;
    height: 40px;
    border: none;
    cursor: pointer;
}
