:root {
    --main-color: #FF6B6B;
    --main-color-light: #FFEDED;
    --main-color-dark: #B34B4B;
    --bg-color: #ffffff;
    --text-color: #333333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.color-picker-container {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

#volumeSlider {
    width: 70px;
    cursor: pointer;
    accent-color: var(--main-color);
}

.color-picker-label {
    cursor: pointer;
    color: var(--main-color);
    transition: opacity 0.3s;
}

.color-picker-label:hover {
    opacity: 0.8;
}

#bgColorPicker {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Custom Color Picker OBS */
.custom-color-picker {
    position: relative;
}

.picker-icon {
    color: var(--main-color);
    cursor: pointer;
    transition: opacity 0.3s;
}

.picker-icon:hover {
    opacity: 0.8;
}

.color-palette {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    border: 2px solid var(--main-color);
    grid-template-columns: repeat(4, 30px);
    gap: 8px;
    z-index: 50;
}

.color-palette.show {
    display: grid;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.container {
    display: flex;
    gap: 40px;
    padding: 40px;
    max-width: 1200px;
    width: 95%;
    border-radius: 20px;
}

.title {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 800;
    color: #fff;
    font-size: 2.8rem;
    letter-spacing: -1px;
    background: var(--main-color);
    padding: 10px 40px;
    border-radius: 15px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.wheel-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-container {
    position: relative;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    border: 4px solid var(--main-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    cursor: pointer;
}

/* Pointer */
.pointer {
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 25px solid transparent;
    border-bottom: 25px solid transparent;
    border-right: 45px solid var(--main-color-dark);
    z-index: 10;
}

/* Center dot */
.wheel-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: var(--main-color-dark);
    border-radius: 50%;
    z-index: 5;
}

.controls-section {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.buttons {
    display: flex;
    gap: 15px;
    align-items: stretch;
    justify-content: center;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--main-color);
    color: #fff;
    padding: 15px 40px;
}

.btn-primary:not(:disabled):hover {
    opacity: 0.9;
}

.btn-secondary {
    flex: 0 0 auto;
    width: 60px;
    padding: 0;
    background: var(--main-color-light);
    color: var(--main-color-dark);
    border: 2px solid var(--main-color);
}

.btn-secondary:not(:disabled):hover {
    opacity: 0.9;
}

.textarea-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

textarea {
    flex: 1;
    width: 100%;
    background: var(--main-color-light);
    border: 2px solid var(--main-color);
    border-radius: 10px;
    padding: 15px;
    color: var(--text-color);
    font-size: 1.1rem;
    resize: none;
    outline: none;
    line-height: 1.5;
}

textarea:focus {
    border-color: var(--main-color-dark);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #fff;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 2px solid var(--main-color);
    border-radius: 20px;
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.modal-content p {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--main-color);
    word-break: break-word;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }
    
    .wheel-container {
        width: 100%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 1 / 1;
    }
    
    #wheelCanvas {
        width: 100%;
        height: 100%;
    }
    
    .controls-section {
        width: 100%;
        flex: auto;
    }
}

/* OBS Modal Textarea */
.close-textarea-btn {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--main-color-dark);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 310;
    align-items: center;
    justify-content: center;
}

.close-textarea-btn:hover {
    opacity: 0.8;
}

.textarea-container.obs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 300;
    padding: 20px;
    display: none;
    align-items: center;
    justify-content: center;
}

.textarea-container.obs-modal.show {
    display: flex;
}

.textarea-container.obs-modal textarea {
    max-width: 500px;
    width: 100%;
    height: 60vh;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    flex: none;
}

.textarea-container.obs-modal .close-textarea-btn {
    display: flex;
}

/* Video Overlay and Events */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.video-overlay.show {
    display: flex;
}

.event-video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.modal-video {
    width: 100%;
    max-width: 300px;
    border-radius: 10px;
    margin-bottom: 15px;
    transform: translateX(50px);
}

/* Modal Buttons Styling */
.modal-buttons {
    display: flex;
    gap: 15px;
    width: 100%;
    margin-top: 20px;
}

.modal-buttons .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.modal-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.modal-buttons .btn-primary {
    background: var(--text-color);
    color: #ffffff;
}

.modal-buttons .btn-secondary {
    background: var(--main-color);
    color: white;
    width: auto;
}
