/* Spin the Wheel Styles */

.wheel-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* VISUAL SECTION */
.visual-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.wheel-display-area {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pointer-top {
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    z-index: 10;
}

#wheelCanvas {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-spin {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    min-height: 50px;
    transition: all 0.3s ease;
}

.btn-spin:not(:disabled):hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-spin:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.result-info {
    text-align: center;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    border: 2px solid var(--border);
}

.result-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
}

/* CONFIGURATION SECTION */
.config-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid var(--border);
    overflow: hidden;
}

.config-panel {
    padding: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
}

.config-panel h3 {
    margin: 0 0 1.5rem 0;
    color: var(--dark);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.75rem;
}

/* ENTRY SECTION */
.entry-section {
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.input-group input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-group .btn {
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
}

/* ITEMS LIST */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 6px;
    border-left: 4px solid var(--primary);
    animation: slideInLeft 0.2s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.item-text {
    font-weight: 500;
    color: var(--dark);
    word-break: break-word;
    flex: 1;
}

.item-remove-btn {
    background: none;
    border: none;
    color: var(--error);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    min-height: 30px;
}

.item-remove-btn:hover {
    color: #c41f3b;
    transform: scale(1.2);
}

/* PRESETS SECTION */
.presets-section {
    margin-bottom: 2rem;
}

.presets-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.preset-btn {
    padding: 0.6rem;
    background: var(--light);
    border: 2px solid var(--border);
    border-radius: 6px;
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ACTION BUTTONS */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-secondary {
    background: var(--light);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* RESULT MODAL */
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.result-modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gray);
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--dark);
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.result-value {
    margin-bottom: 1.5rem;
}

.winner-text {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    word-break: break-word;
}

#spin-again-btn {
    width: 100%;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .wheel-content {
        grid-template-columns: 1fr;
    }

    .config-section {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .wheel-content {
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .wheel-display-area {
        padding: 1rem;
    }

    #wheelCanvas {
        width: 100%;
        height: auto;
        max-width: 350px;
    }

    .preset-buttons {
        grid-template-columns: 1fr;
    }

    .config-panel {
        padding: 1rem;
        max-height: none;
    }

    .modal-content {
        width: 95%;
    }

    .result-value {
        margin-bottom: 1rem;
    }

    .winner-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .pointer-top {
        top: -0.75rem;
        font-size: 1.5rem;
    }

    .btn-spin {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }

    .config-panel h3 {
        font-size: 1rem;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group .btn {
        width: 100%;
    }

    .preset-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .preset-btn {
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    .result-text {
        font-size: 0.9rem;
    }
}

/* SCROLLBAR STYLING */
.config-panel::-webkit-scrollbar {
    width: 8px;
}

.config-panel::-webkit-scrollbar-track {
    background: var(--light);
}

.config-panel::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.config-panel::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* PRINT STYLES */
@media print {
    .config-section,
    .result-modal,
    .btn-spin {
        display: none;
    }

    .wheel-display-area {
        box-shadow: none;
        page-break-inside: avoid;
    }
}
