/* ========================================
   🎰 WHEEL GAME STYLES - VÒNG QUAY MAY MẮN
   ======================================== */

/* Wheel Modal Styles */
.wheel-modal {
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.wheel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.wheel-wrapper {
    position: relative;
    display: inline-block;
}

.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    color: #ff4757;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Wheel Controls */
.wheel-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    min-width: 150px;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-large:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Wheel Options */
.wheel-options {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.option-group {
    margin-bottom: 15px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #333;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

/* Excluded Names */
.excluded-names {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.excluded-names h4 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
}

.name-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.name-tag {
    background: #007bff;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.name-tag.excluded {
    background: #dc3545;
}

.remove-tag {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.remove-tag:hover {
    opacity: 1;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 15px;
}

/* No Names Left */
.no-names-left {
    text-align: center;
    padding: 30px;
    background: #d4edda;
    border-radius: 12px;
    color: #155724;
}

.no-names-left i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #28a745;
}

.no-names-left p {
    font-size: 18px;
    font-weight: 600;
    margin: 15px 0;
}

/* Task Preview */
.task-preview {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.task-preview h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.task-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.task-tag {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.task-tag.more {
    background: #6c757d;
    font-style: italic;
}

/* Task Editor Modal */
.task-editor-modal {
    max-width: 700px;
    width: 95%;
    max-height: 85vh;
}

/* Wheel Result Modal */
.wheel-result-modal {
    max-width: 500px;
    width: 95%;
    text-align: center;
}

.result-content {
    padding: 20px;
}

.result-icon {
    font-size: 80px;
    margin: 20px 0;
    animation: bounce 1s ease-in-out;
}

.result-content h3 {
    color: #333;
    margin: 20px 0 10px 0;
    font-size: 18px;
}

.result-task {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    line-height: 1.4;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    80% {
        transform: translateY(-10px);
    }
}

.task-editor {
    padding: 0;
}

.add-task-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: #007bff;
    outline: none;
}

.input-group button {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
}

/* Task List Editor */
.task-list-editor h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.task-items {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s;
}

.task-item:last-child {
    border-bottom: none;
}

.task-item:hover {
    background-color: #f8f9fa;
}

.task-text {
    flex: 1;
    font-size: 14px;
    color: #333;
    margin-right: 15px;
}

.task-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-icon:hover {
    background-color: #e9ecef;
    color: #495057;
}

.btn-icon.danger:hover {
    background-color: #f8d7da;
    color: #721c24;
}

/* Editor Actions */
.editor-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Add Expense Menu Button */
.add-expense-menu {
    position: relative;
    display: inline-block;
}

.add-expense-fab {
    display: flex !important; /* Override any hiding */
    z-index: 1001 !important; /* Ensure it's above other elements */
}

.add-expense-menu .dropdown-menu {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.1);
    z-index: 99999;
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.add-expense-menu.active .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(-10px) scale(1) !important;
    animation: menuSlideIn 0.3s ease-out !important;
}

@keyframes menuSlideIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(-10px) scale(1);
    }
}

.dropdown-menu .menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    text-align: left;
    border: none;
    background: none;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    gap: 12px;
    position: relative;
    backdrop-filter: blur(10px);
}

.dropdown-menu .menu-item:first-child {
    border-radius: 16px 16px 0 0;
}

.dropdown-menu .menu-item:last-child {
    border-bottom: none;
    border-radius: 0 0 16px 16px;
}

.dropdown-menu .menu-item:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
    transform: translateX(4px) scale(1.02);
    box-shadow: inset 0 0 20px rgba(255,255,255,0.1);
}

.dropdown-menu .menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.dropdown-menu .menu-item small {
    margin-left: auto;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wheel-modal {
        width: 98%;
        margin: 10px;
    }
    
    .wheel-wrapper canvas {
        width: 280px !important;
        height: 280px !important;
    }
    
    .wheel-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        width: 100%;
        max-width: 250px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group button {
        width: 100%;
    }
    
    .editor-actions {
        flex-direction: column;
    }
    
    .task-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .task-actions {
        align-self: flex-end;
    }
    
    .name-tags {
        justify-content: center;
    }
    
    .task-list {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .wheel-wrapper canvas {
        width: 250px !important;
        height: 250px !important;
    }
    
    .task-editor-modal {
        width: 98%;
        margin: 5px;
    }
    
    .add-task-section {
        padding: 15px;
    }
    
    .wheel-options {
        padding: 15px;
    }
    
    .task-preview {
        padding: 15px;
    }
}

/* Animation for spinning wheels */
@keyframes wheelSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.wheel-spinning {
    animation: wheelSpin 0.1s linear infinite;
}

/* Success animation */
@keyframes celebrate {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.celebrate {
    animation: celebrate 0.6s ease-in-out;
}

/* Hover effects for interactive elements */
.wheel-wrapper:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.task-item:hover .task-text {
    color: #007bff;
}

/* Scrollbar styling for task list */
.task-items::-webkit-scrollbar {
    width: 6px;
}

.task-items::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 3px;
}

.task-items::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.task-items::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 