/* pickerwheel.css — celikezor pickerwheel oyunu stilleri */
/* Template: templates/data_manager/games/pickerwheel.html'den çıkarıldı */

/* Desktop layout split */
.picker-page-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
    height: calc(100vh - 100px);
    min-height: 0;
}

@media (max-width: 992px) {
    .picker-page-container {
        height: auto;
        min-height: calc(100vh - 80px);
        padding: 1rem 0.5rem;
    }
}

.picker-header {
    text-align: center;
    margin-bottom: 2rem;
    flex-shrink: 0;
}

.picker-title {
    font-size: min(2rem, 4.5vh);
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--accent-hover);
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}

.picker-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.picker-main-layout {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

@media (max-width: 992px) {
    .picker-main-layout {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
}

/* Left Wheel Area */
.picker-wheel-area {
    flex: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0;
    width: 100%;
    max-width: 500px;
}

.wheel-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    .wheel-wrapper {
        max-width: 320px;
    }
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 50%;
    display: block;
}

/* Central pointer pointing straight UP */
.pointer-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

@media (max-width: 480px) {
    .pointer-wrapper {
        width: 80px;
        height: 80px;
    }
}

.wheel-pointer-teardrop {
    position: absolute;
    width: 76px;
    height: 76px;
    background: #000000;
    border: 4px solid #ffffff;
    border-radius: 50% 50% 0 50%;
    transform: rotate(225deg); /* Rotates sharp corner to point straight UP (12 o'clock) */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    top: 50%;
    left: 50%;
    margin-top: -38px;
    margin-left: -38px;
}

@media (max-width: 480px) {
    .wheel-pointer-teardrop {
        width: 66px;
        height: 66px;
        margin-top: -33px;
        margin-left: -33px;
    }
}

#spin-btn {
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #000000;
    border: none;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
    outline: none;
    user-select: none;
    text-align: center;
    top: 50%;
    left: 50%;
    margin-top: -29px;
    margin-left: -29px;
    transition: transform 0.1s, box-shadow 0.2s;
    line-height: 1;
    padding: 0;
}

@media (max-width: 480px) {
    #spin-btn {
        width: 50px;
        height: 50px;
        margin-top: -25px;
        margin-left: -25px;
        font-size: 0.8rem;
    }
}

#spin-btn:hover {
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

#spin-btn:active {
    transform: scale(0.95);
}

/* Right Inputs Area */
.picker-inputs-area {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    background: rgba(10, 14, 23, 0.7);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-sizing: border-box;
    height: 100%;
    min-height: 450px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

@media (max-width: 992px) {
    .picker-inputs-area {
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 1.2rem;
    }
}

.inputs-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 210, 255, 0.15);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.inputs-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inputs-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffff;
}

.inputs-count {
    background: rgba(0, 210, 255, 0.15);
    color: var(--accent-hover);
    border: 1px solid rgba(0, 210, 255, 0.3);
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.8rem;
    font-weight: 700;
}

.clear-all-btn {
    background: transparent;
    border: 1px solid rgba(255, 51, 51, 0.3);
    color: #ff3333;
    border-radius: 8px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.clear-all-btn:hover {
    background: rgba(255, 51, 51, 0.1);
    border-color: #ff3333;
    box-shadow: 0 0 8px rgba(255, 51, 51, 0.3);
}

.input-entry-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

#choices-textarea {
    flex: 1;
    background: #000000;
    border: 1px solid var(--surface-border);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
    outline: none;
    resize: none;
    font-family: inherit;
    transition: all 0.2s;
    height: 60px;
    line-height: 1.4;
}

#choices-textarea:focus {
    border-color: var(--accent-hover);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.25);
}

#add-choice-btn {
    background: var(--accent-color);
    color: #000000;
    border: none;
    border-radius: 8px;
    width: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
}

#add-choice-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
}

.inputs-list-header {
    display: flex;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    border-bottom: 1px solid var(--surface-border);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.col-active {
    width: 45px;
    text-align: center;
}

.col-weight {
    width: 55px;
    text-align: center;
}

.col-color {
    width: 45px;
    text-align: center;
}

.col-text {
    flex: 1;
    padding-left: 0.5rem;
}

.col-actions {
    width: 45px;
    text-align: center;
}

.choices-list-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
    min-height: 250px;
    max-height: 400px;
}

.choices-list-container::-webkit-scrollbar {
    width: 6px;
}

.choices-list-container::-webkit-scrollbar-track {
    background: rgba(15, 20, 32, 0.2);
    border-radius: 4px;
}

.choices-list-container::-webkit-scrollbar-thumb {
    background: rgba(0, 210, 255, 0.25);
    border-radius: 4px;
}

.choices-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 210, 255, 0.5);
}

.choice-item-row {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 6px 0;
    transition: all 0.2s;
}

.choice-item-row:hover {
    background: rgba(0, 210, 255, 0.04);
    border-color: rgba(0, 210, 255, 0.15);
}

/* Custom Checkbox */
.choice-active-checkbox {
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-checkbox-container {
    display: inline-block;
    position: relative;
    width: 18px;
    height: 18px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--surface-border);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.custom-checkbox-container:hover input ~ .checkmark {
    border-color: var(--accent-hover);
    background-color: rgba(0, 210, 255, 0.05);
}

.custom-checkbox-container input:checked ~ .checkmark {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.4);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox-container .checkmark:after {
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid #000000;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.choice-weight-col {
    width: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.choice-weight-input {
    width: 44px;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    border: 1.5px solid var(--surface-border);
    color: #ffffff;
    border-radius: 6px;
    padding: 2px;
    font-size: 0.85rem;
    text-align: center;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.choice-weight-input:focus {
    border-color: var(--accent-hover);
    box-shadow: 0 0 6px rgba(0, 210, 255, 0.3);
    background: #000000;
}

.choice-weight-input::-webkit-inner-spin-button,
.choice-weight-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.choice-weight-input {
    -moz-appearance: textfield;
}

.choice-color-col {
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.choice-color-picker-input {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    padding: 0;
    outline: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.choice-color-picker-input:hover {
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

.choice-color-picker-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.choice-color-picker-input::-webkit-color-swatch {
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
}

.choice-text-input-wrapper {
    flex: 1;
    padding: 0 0.5rem;
}

.choice-text-input {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
    padding: 4px 6px;
    border-radius: 4px;
    outline: none;
    transition: all 0.2s;
}

.choice-text-input:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent-hover);
}

.choice-actions-col {
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-choice-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    padding: 4px 8px;
}

.delete-choice-btn:hover {
    color: #ff3333;
}

/* Winner Announcement Modal */
.winner-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    animation: wFadeIn 0.3s ease;
}

.winner-modal-card {
    background: rgba(10, 14, 23, 0.98);
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0, 210, 255, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    animation: winnerScaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes winnerScaleUp {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.winner-trophy {
    margin-bottom: 1.5rem;
    animation: trophyBounce 1s ease infinite alternate;
}

@keyframes trophyBounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.winner-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.winner-name {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.6);
    margin-bottom: 2rem;
    word-wrap: break-word;
}

.winner-close-btn {
    background: var(--accent-color);
    color: #000000;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.winner-close-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 20px rgba(0, 210, 255, 0.5);
    transform: translateY(-2px);
}

@keyframes wFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(105vh) rotate(360deg);
        opacity: 0;
    }
}
