:root {
    --primary-pink: #ffb6c1;
    --dark-grey: #333;
    --light-grey: #f4f4f9;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-grey);
    margin: 0;
    padding: 20px;
    display: block;
    flex-direction: column;
    /* align-items: flex-start; */
}

.header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    width: 100%;
    margin-bottom: 5px;
}

#title {
    font-size: 2.5rem;
    margin: 30px;
    width: 540px;
    text-align: center;
    padding-right: 20px 0;
}

#result {
    min-height: 0;
    margin: 0;
    color: red;
    text-align: center;
}

#currentDate {
    height: 40px;
}

#language_button {
    width: 150px;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: center;
    height: 40px;
    margin-right: 10px;
}


#language_button:hover {
    transform: scale(1.05);
    filter: brightness(0.9);
}

#Start_button {
    margin-left: 10px;
    width: 150px;
    height: 45px;
    padding: 0 25px;
    background-color: var(--primary-pink);
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

/*列表自動換行*/
#list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
    width: 650px;
    margin-top: 20px;
}

.input-container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 15px;
    margin-top: 5px;
    margin: 0;
    padding: 5px 0 20px 0;
    border-radius: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.input-group p {
    margin: 0 0 8px 0;
    font-size: 14px;
    white-space: nowrap;
    line-height: 1;
    min-width: 100px;
    display: inline-block;
}

input[type="color"] {
    width: 80px;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    background: none;
    padding: 3;
}

input[type="text"],
input[type="date"] {
    width: 130px;
    height: 20px;
    padding: 10px 15px;
    font-size: 16px;
}

.item_row {
    transition: background-color 0.3s ease;
    padding: 20px;
    border-radius: 15px;
    border: none;
    width: calc(50% - 10px);
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.delete_button {
    position: absolute;
    top: 10px;
    right: 10px;
    transition: color 0.3s;
    color: red;
}

.share_button {
    position: absolute;
    top: 10px;
    right: 45px;
    color: blue;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 20px;
}

.item_eventName {
    font-size: 1.8rem;
    text-align: center;
    border-bottom: 2px solid var(--primary-pink);
    padding: 15px 0;
    margin: 0 auto 15px auto;
    width: 100%;
    display: block;
}

.timer_display {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
}

.time-unit {
    display: flex !important;
    flex-direction: column;
    align-items: center;
}

.time-unit small {
    font-size: 0.8rem;
    color: inherit;
    margin-top: 5px;
}

.percent-container {
    width: 100%;
    height: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 15px;
    border: none;
}

.percent-bar {
    height: 100%;
    border-radius: 10px 0 0 10px;
    transition: width 1s linear;
    margin-left: 0;
}

/* .animate {
    transform: scale(1.1);
    color: #ff6b6b;
} */


.time-box {
    text-align: center;
}

.tiles-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    height: 40px;
}

.num {
    height: 40px;
    overflow: hidden;
    position: relative;
}

.num div {
    height: 40px;
    line-height: 40px;
    transition: transform 0.5s ease;
}

.digit-strip {
    display: flex;
    flex-direction: column;
    transition: transform 0.5s ease;
}

.digit-tile {
    width: 15px;
    height: 40px;
    overflow: hidden;
    position: relative;
}

.digit-strip span {
    height: 40px;
    line-height: 40px;
    display: block;
    text-align: center;
}

.left-section {
    flex: 0 1 auto;
}

/* 右側滾輪外殼 */
.right-section {
    top: 20px;
    width: 300px;
    padding-top: 85px;
}

.slot-machine {
    background-color: #ffb11b;
    border: 5px solid #000;
    border-radius: 30px;
    padding: 20px;
    text-align: center;
    box-shadow: 5px 5px 0px #000;
}

.slot-window {
    height: 60px;
    overflow: hidden;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 20px;
    position: relative;
    border: 2px solid #333;
}

.slot-list {
    transition: transform 3s cubic-bezier(0.1, 0, 0.1, 1);
}

@keyframes pop-effect {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.pop-animation {
    animation: pop-effect 0.5s ease-out;
    transition: color 0.3s;
}

.slot-list div {
    height: 60px;
    line-height: 60px;
    font-weight: bold;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

#spin-button {
    background: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
}

.main-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 230px;
    /* 調整左右兩側的間距 */
    width: 100%;
}