/* css/components.css */

.control-button {
    background-color: #2196f3; /* 기본 파란색 */
    color: #ffffff;
    font-weight: 600;
    padding: 0.7rem 0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    text-align: center;
    display: block; /* 기본적으로 블록 요소 */
}

.control-button:hover {
    background-color: #1976d2; /* 진한 파란색 */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.control-button:disabled {
    background-color: #bdbdbd; /* 비활성화 회색 */
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.control-button.active-mode {
    background-color: #4CAF50; /* 활성화 시 녹색 */
}

.control-button.active-mode:hover {
    background-color: #388E3C; /* 진한 녹색 */
}

/* Specific button colors (utility classes for buttons) */
.control-button.danger-button {
    background-color: #f44336; /* 빨간색 */
}
.control-button.danger-button:hover {
    background-color: #d32f2f;
}

.control-button.primary-button { /* 배치 모드 버튼 */
    background-color: #9c27b0; /* 보라색 */
}
.control-button.primary-button:hover {
    background-color: #7b1fa2;
}

.control-button.warning-button { /* 배치 초기화 버튼 */
    background-color: #ffc107; /* 노란색 */
    color: #333; /* 텍스트 색상 변경 */
}
.control-button.warning-button:hover {
    background-color: #ffa000;
}

.control-button.special-button { /* 패자부활전 버튼 */
    background-color: #ff9800; /* 주황색 */
}
.control-button.special-button:hover {
    background-color: #f57c00;
}

/* Button sizing */
.control-button.full-width {
    width: 100%;
}
.control-button.half-width {
    flex: 1; /* flex item으로 공간 분배 */
    width: auto; /* 고정 너비 해제 */
}


/* Input Field */
.input-field {
    width: 100%; /* 부모 너비에 꽉 차게 */
    box-sizing: border-box; /* 패딩/보더 포함 너비 계산 */
}

.ball-name-input-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    box-sizing: border-box;
    width: 100%;
}

.ball-name-input {
    flex-grow: 1;
}

.emoji-select {
    width: auto;
    /* padding: 0.6rem; */
    min-width: 60px;
    text-align: center;
}

/* Obstacle Palette Button */
.obstacle-tool-btn {
    background-color: #e0e0e0; /* 밝은 회색 */
    color: #333;
    font-weight: 500;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    transition: background-color 0.2s ease-in-out;
    border: none;
    cursor: pointer;
    width: 100%; /* 팔레트 내에서 꽉 채우기 */
    text-align: center; /* 텍스트 중앙 정렬 */
    margin-bottom: 8px;
}
.obstacle-tool-btn:hover {
    background-color: #c0c0c0; /* 좀 더 진한 회색 */
}
.obstacle-tool-btn:last-child {
    margin-bottom: 0;
}


/* Ranking List Item Styles */
.ranking-list-item {
    background-color: #f8f8f8;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    font-size: 0.75rem;
    color: #555;
    transition: all 0.1s ease-in-out;
}

.ranking-list-item.rank-1 {
    font-weight: 700;
    color: #FFD700; /* 황금색 */
    background-color: #fffde7;
    border: 1px solid #ffecb3;
    transform: scale(1.02);
}
.ranking-list-item.rank-2 {
    font-weight: 600;
    color: #B0BEC5; /* 은색 */
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
}
.ranking-list-item.rank-3 {
    font-weight: 500;
    color: #CD7F32; /* 동색 */
    background-color: #fff3e0;
    border: 1px solid #ffe0b2;
}

/* Checkbox and Label Alignment */
.align-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.align-checkbox-label label {
    margin-bottom: 0; /* 라벨 자체의 하단 마진 제거 */
    flex-grow: 1; /* 라벨이 공간을 차지하도록 */
    cursor: pointer;
}
.align-checkbox-label input[type="checkbox"] {
    margin-left: 0.5rem;
    flex-shrink: 0; /* 체크박스가 축소되지 않도록 */
}


/* Toast Message Box */
.toast-message-box {
    position: fixed;
    bottom: 30px; /* 하단에서 30px 위 */
    left: 50%;
    transform: translateX(-50%) translateY(100px); /* 초기에는 화면 아래 숨겨짐 */
    background-color: rgba(45, 45, 45, 0.9); /* 어두운 배경, 반투명 */
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s ease-out;
    z-index: 999; /* 다른 요소 위에 나타나도록 */
    min-width: 250px;
    max-width: 80%;
    text-align: center;
    font-size: 1rem;
}

.toast-message-box.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0); /* 위로 올라오면서 표시 */
}

/* Toast content */
.toast-message-box p {
    margin: 0;
    padding: 0;
    font-style: normal;
    color: inherit;
    font-size: inherit;
}