/* style.css */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
}

.container {
    background-color: white;
    padding: 0 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

h1 {
    color: #1a73e8;
}

.roulette-container {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    position: relative;
    margin: 0 auto;
}

#roulette-canvas {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}

#spin-button {
    margin-top: 15px;
    padding: 12px 25px;
    font-size: 1.2em;
    cursor: pointer;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#spin-button:hover {
    background-color: #1a73e8;
}

#spin-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}


.controls-container {
    margin-top: 40px;
    text-align: left;
}

#add-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#new-option-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#add-form button {
    padding: 10px 15px;
    background-color: #34a853;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#add-form button:hover {
    background-color: #1e8e3e;
}

/* 可折叠区域样式 */
.collapsible {
    margin-top: 20px;
}

.collapsible-header {
    background-color: #f1f3f4;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
    user-select: none;
}

.collapsible-header:hover {
    background-color: #e8eaed;
}

.arrow {
    transition: transform 0.3s ease;
}

.arrow.rotated {
    transform: rotate(180deg);
}

.collapsible-content {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-content.expanded {
    max-height: 1000px; /* 足够大的值以容纳内容 */
}

#options-list li {
    background-color: #f8f9fa;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delete-button {
    background-color: #ea4335;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.delete-button:hover {
    background-color: #c5221f;
}

/* 加载遮罩样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
    font-size: 1.2em;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4285f4;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}