/* ================================================
   HOW RICH ARE YOU - PREMIUM SPIN WHEEL STYLES
   ================================================ */

:root {
    --primary-color: #4F46E5;
    --secondary-color: #06B6D4;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --dark-color: #1F2937;
    --light-color: #F9FAFB;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================
   BASE CONTAINER
   ================================================ */

.rich-wheel-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

.rich-wheel-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--dark-color);
}

.rich-wheel-title-suite{
    color:#e74c3ce6 !important;
}

.rich-wheel-title{
    color:#ffffff !important;
}


/* ================================================
   WHEEL SECTION
   ================================================ */

.wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.wheel-wrapper {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto;
}

.fortune-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.9),
                0 0 0 12px var(--border-color),
                var(--shadow-xl),
                0 0 40px rgba(79, 70, 229, 0.2);
    transition: transform 8s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    will-change: transform;
}

.fortune-wheel.spinning {
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

/* Wheel Pointer */
.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid var(--danger-color);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    z-index: 20;
}

.wheel-pointer::after {
    content: '';
    position: absolute;
    top: -30px;
    left: -15px;
    width: 30px;
    height: 30px;
    background: var(--danger-color);
    border-radius: 50%;
    border: 3px solid white;
}

/* Spin Button */
.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85px;
    height: 85px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #f8fafc;
    border-radius: 50%;
    box-shadow: var(--shadow-lg), inset 0 2px 4px rgba(255, 255, 255, 0.5);
    cursor: pointer;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-weight: 700;
    color: var(--primary-color);
}

.wheel-center:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: var(--shadow-xl), inset 0 2px 4px rgba(255, 255, 255, 0.5);
    border-color: var(--secondary-color);
}

.wheel-center:active:not(:disabled) {
    transform: translate(-50%, -50%) scale(0.98);
}

.wheel-center:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.wheel-center .spin-text {
    font-size: 1.125rem;
    letter-spacing: 0.05em;
}

.wheel-center .spin-icon {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ================================================
   RESULT MODAL WITH CONFETTI
   ================================================ */

.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.result-modal.show {
    display: block;
    opacity: 1;
}

.result-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.result-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    animation: modalZoomIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalZoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.result-modal-inner {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 3px solid var(--success-color);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    min-width: 400px;
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1.5rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.result-content {
    text-align: center;
    margin-bottom: 2rem;
}

.result-label {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--success-color);
    margin: 0 0 1rem 0;
}

.result-amount {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--dark-color);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1);
    line-height: 1;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.btn-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: 2px solid var(--success-color);
    background: white;
    color: var(--success-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-action:hover {
    background: var(--success-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-action:active {
    transform: translateY(0);
}

.btn-action .btn-icon {
    font-size: 1.25rem;
}

.btn-close-modal {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-close-modal:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-close-modal:active {
    transform: translateY(0);
}

/* ================================================
   HISTORY PANEL
   ================================================ */

.history-panel {
    width: 100%;
    max-width: 500px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.history-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.history-icon {
    font-size: 1.25rem;
}

.btn-clear-history {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-size: 1.25rem;
    opacity: 0.6;
}

.btn-clear-history:hover {
    opacity: 1;
    background: #fee2e2;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 100px;
    max-height: 200px;
    overflow-y: scroll;
    overflow-x: none;
}

.history-empty {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-style: italic;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--light-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: var(--transition);
}

.history-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.history-item-index {
    font-weight: 600;
    color: var(--primary-color);
}

.history-item-amount {
    font-weight: 700;
    color: var(--dark-color);
}

.btn-delete-history-item {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-delete-history-item:hover {
    color: var(--danger-color);
    background: #fee2e2;
}

/* ================================================
   CONTROL PANEL
   ================================================ */

.control-panel {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: sticky;
    top: 1rem;
}

.panel-header {
    background: #f2f2f2;
    padding: 1.5rem;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.panel-icon {
    font-size: 1.5rem;
}

.panel-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Control Groups */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark-color);
}

.label-icon {
    font-size: 1.125rem;
}

/* Prize List */
.prize-list {
    list-style: none;
    padding: 0.5rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
}

.prize-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prize-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: var(--transition);
}

.prize-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-delete-prize {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}

.btn-delete-prize:hover {
    background: #dc2626;
}

.control-help {
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
}

/* Control Select */
.control-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #f2f2f2;
    border-radius: var(--radius-md);
    background: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    height:54px;
}

.control-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Button Grid */
.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.btn-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--light-color);
    color: var(--dark-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f3f4f6;
    border-color: var(--dark-color);
    transform: translateY(-2px);
}

.btn-control:active {
    transform: translateY(0);
}

.btn-control .btn-icon {
    font-size: 1.125rem;
}

/* Control Switch */
.control-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.control-switch:hover {
    background: var(--light-color);
}

.control-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: #cbd5e1;
    border-radius: 13px;
    transition: var(--transition);
}

.switch-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.control-switch input:checked + .switch-slider {
    background: var(--success-color);
}

.control-switch input:checked + .switch-slider::before {
    transform: translateX(24px);
}

.switch-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark-color);
}

.switch-icon {
    font-size: 1.125rem;
}

/* ================================================
   DISCLAIMER
   ================================================ */

.disclaimer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #fef3c7;
    border: 1px solid #fde047;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #92400e;
    max-width: 500px;
    width: 100%;
}

.disclaimer-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
}

/* ================================================
   TOAST NOTIFICATIONS
   ================================================ */

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    min-width: 280px;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease-out;
    pointer-events: auto;
    border-left: 4px solid var(--success-color);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.info {
    border-left-color: var(--primary-color);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--dark-color);
    margin: 0 0 0.25rem 0;
}

.toast-message {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 1024px) {
    .rich-wheel-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .control-panel {
        position: static;
        order: 2;
    }
    
    .wheel-section {
        order: 1;
    }
}

@media (max-width: 640px) {
    .rich-wheel-wrapper {
        padding: 0.5rem;
    }
    
    .wheel-wrapper {
        width: 320px;
        height: 320px;
    }
    
    .wheel-center {
        width: 80px;
        height: 80px;
    }
    
    .wheel-center .spin-text {
        font-size: 0.875rem;
    }
    
    .wheel-center .spin-icon {
        font-size: 1.25rem;
    }
    
    .result-modal-inner {
        width: 100%;
        padding: 2rem 1.5rem;
    }
    
    .result-amount {
        font-size: 2.5rem;
    }
    
    .result-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-action {
        width: 100%;
    }
    
    .panel-body {
        padding: 1rem;
    }
    
    .button-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-primary {
        grid-column: 1;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
}

/* ================================================
   ACCESSIBILITY
   ================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .wheel-center,
    .btn-action,
    .btn-control {
        border-width: 3px;
    }
    
    .control-textarea,
    .control-select {
        border-width: 3px;
    }
}

/* Focus visible styles */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ================================================
   PRINT STYLES
   ================================================ */

@media print {
    .control-panel,
    .result-actions,
    .wheel-center,
    .toast-container {
        display: none !important;
    }
    
    .rich-wheel-container {
        grid-template-columns: 1fr;
    }
}