/* assets/css/generators/wheel-spinner.css - Updated unified interface */

.wheel-spinner-page {
    padding: 2rem 0;
}

/* Remove local page-header styles - now using global from main.css */

.generator-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-bottom: 3rem;
}

.wheel-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 500px;
}

.wheel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: var(--transition);
    flex: 1;
    margin-bottom: 2rem;
}

.wheel-container:hover {
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
}

.wheel {
    display: block;
    border-radius: 50%;
    border: 8px solid var(--dark);
    transition: transform 4s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    width: 600px !important;
    height: 600px !important;
}

.clickable-wheel {
    cursor: pointer;
}

.clickable-wheel:hover {
    filter: brightness(1.05);
}

.wheel.spinning {
    cursor: not-allowed;
}

.pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid var(--danger-color);
    z-index: 10;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3));
}

.result-display {
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 2rem;
}

.result-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    text-align: center;
    width: 100%;
    word-wrap: break-word;
    line-height: 1.4;
}

.result-winner {
    background: linear-gradient(135deg, var(--success-color), #7bed9f);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(46, 213, 115, 0.3);
    animation: resultPulse 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.result-winner .btn {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    margin: 0 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    transition: all 0.3s ease;
}

.result-winner .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

@keyframes resultPulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.spin-btn {
    background: linear-gradient(135deg, var(--danger-color), #ff6b7a);
    font-size: 1.25rem;
    padding: 1rem 3rem;
    box-shadow: 0 10px 30px rgba(255, 71, 87, 0.3);
    transition: all 0.3s ease;
    min-width: 200px;
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 71, 87, 0.4);
}

.spin-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.settings-panel {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.settings-tabs {
    display: flex;
    background: var(--light);
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.tab-btn.active {
    color: var(--primary-color);
    background: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-content {
    padding: 1.5rem;
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
    resize: vertical;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.help-text {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0.75rem;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.item-count {
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.history-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--light);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.history-item:hover {
    background: #e8e8e8;
}

.history-item-info {
    flex: 1;
}

.history-item-time {
    font-size: 0.75rem;
    color: #666;
}

.history-item-details {
    font-weight: 600;
    margin-top: 0.25rem;
}

.history-item-result {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-color);
}

.empty-history {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.items-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.items-section h3 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.item-chip {
    background: var(--light);
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 0.75rem;
    text-align: center;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.item-chip:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.item-chip .remove-item {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--danger-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.item-chip:hover .remove-item {
    opacity: 1;
}

.info-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.info-section h2 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.info-section p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.25rem;
    text-align: justify;
}

.info-section p:last-child {
    margin-bottom: 2rem;
}

.use-cases {
    margin-top: 2rem;
}

.use-cases h3 {
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.use-case {
    text-align: center;
    padding: 1.5rem;
    background: var(--light);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.use-case:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.use-case .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.use-case h4 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.use-case p {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

/* Wheel tap hint */
.wheel-tap-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 15;
}

.wheel-container:hover .wheel-tap-hint {
    opacity: 1;
}

.wheel.spinning ~ .wheel-tap-hint {
    display: none;
}

/* Sound wave animation */
.wheel.sound-enabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: soundWave 0.8s ease-out;
    pointer-events: none;
}

@keyframes soundWave {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2);
    }
}

/* Responsive design */
@media (max-width: 992px) {
    .generator-content {
        grid-template-columns: 1fr;
    }
    
    .settings-panel {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .wheel-container {
        padding: 10px;
    }
    
    .wheel {
        width: 300px !important;
        height: 300px !important;
    }
    
    .wheel-section {
        padding: 1.5rem 1rem;
        min-height: 400px;
    }
    
    /* Panel settings at full width */
    .generator-content {
        padding: 0 1rem;
        gap: 1.5rem;
    }
    
    .settings-panel {
        max-width: 100%;
        margin: 0;
        border-radius: var(--border-radius);
        box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    }
    
    /* Settings tabs mobile layout */
    .settings-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }
    
    .tab-btn {
        font-size: 0.875rem;
        padding: 0.875rem 0.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .form-control,
    textarea.form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        max-width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .wheel {
        width: 250px !important;
        height: 250px !important;
    }
    
    .pointer {
        top: -10px;
        border-left: 15px solid transparent;
        border-right: 15px solid transparent;
        border-top: 30px solid var(--danger-color);
    }
    
    .wheel-section {
        padding: 1rem 0.5rem;
    }
    
    .spin-btn {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
        min-width: 150px;
    }
    
    .result-text {
        font-size: 0.875rem;
        padding: 0 0.5rem;
    }
    
    .info-section {
        padding: 1.5rem 1rem;
    }

    .info-section p {
        text-align: left;
    }

    /* Settings tabs for small screens */
    .settings-tabs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tab-btn {
        font-size: 0.75rem;
        padding: 0.75rem 0.25rem;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .wheel {
        width: 220px !important;
        height: 220px !important;
    }
}