/* =================================================================
   UNDERGROUND FARMER - CHEATS STYLES
   ================================================================= */

/* =================================================================
   1. CHEATS DIALOG
   ================================================================= */
.cheats-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cheatsDialogAppear 0.3s ease-out;
}

@keyframes cheatsDialogAppear {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cheats-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.cheats-content {
    position: relative;
    background: linear-gradient(145deg, #2c1810, #1a0f0a);
    border: 3px solid #ff4444;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 68, 68, 0.3);
    min-width: 500px;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: cheatsContentSlide 0.3s ease-out;
}

@keyframes cheatsContentSlide {
    from {
        transform: scale(0.8) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* =================================================================
   2. CHEATS HEADER
   ================================================================= */
.cheats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 2px solid #ff4444;
    background: linear-gradient(135deg, #ff4444, #cc3333);
}

.cheats-header h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.cheats-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s;
}

.cheats-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* =================================================================
   3. CHEATS BODY
   ================================================================= */
.cheats-body {
    padding: 20px 25px;
    color: #e0d0c0;
}

/* =================================================================
   4. CHEATS FOOTER
   ================================================================= */
.cheats-footer {
    padding: 15px 25px 20px;
    border-top: 2px solid #ff4444;
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.3), rgba(204, 51, 51, 0.3));
    text-align: center;
}

.cheats-save-btn {
    background: linear-gradient(135deg, #ff6347, #dc143c);
    border: 2px solid #ff6347;
    border-radius: 8px;
    color: #ffffff;
    padding: 12px 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    font-family: 'Courier New', monospace;
    min-width: 120px;
}

.cheats-save-btn:hover {
    background: linear-gradient(135deg, #ff7f7f, #ff6347);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4);
}

.cheats-save-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* =================================================================
   5. CHEATS SECTION
   ================================================================= */
.cheats-section {
    margin-bottom: 25px;
}

.cheats-section h4 {
    color: #ff4444;
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 15px 0;
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.cheats-section h4::before {
    content: "☠️";
    color: #ff4444;
}

.cheats-section h5 {
    color: #daa520;
    font-size: 14px;
    font-weight: bold;
    margin: 20px 0 10px 0;
    font-family: 'Courier New', monospace;
}

/* =================================================================
   2. QUICK ACTIONS
   ================================================================= */
.cheats-quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cheat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff4444, #cc3333);
    border: 2px solid #ff4444;
    border-radius: 8px;
    color: #ffffff;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    font-family: 'Courier New', monospace;
    flex: 1;
    min-width: 160px;
    justify-content: center;
}

.cheat-btn:hover {
    background: linear-gradient(135deg, #ff6666, #ff4444);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4);
}

.cheat-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cheat-btn .cheat-icon {
    margin-right: 0;
    font-size: 16px;
}

.cheat-give-all {
    background: linear-gradient(135deg, #32cd32, #228b22);
    border-color: #32cd32;
}

.cheat-give-all:hover {
    background: linear-gradient(135deg, #98fb98, #32cd32);
}

.cheat-reset-all {
    background: linear-gradient(135deg, #ff6347, #dc143c);
    border-color: #ff6347;
}

.cheat-reset-all:hover {
    background: linear-gradient(135deg, #ff7f7f, #ff6347);
}

/* =================================================================
   3. INDIVIDUAL RESOURCE CHEATS
   ================================================================= */
.cheats-individual {
    background: rgba(139, 69, 19, 0.2);
    border: 1px solid #8b4513;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.cheat-resource-selector {
    margin-bottom: 15px;
}

.cheat-resource-selector label {
    display: block;
    color: #e0d0c0;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.cheat-resource-selector select {
    background: linear-gradient(135deg, #654321, #8b4513);
    border: 2px solid #8b4513;
    border-radius: 6px;
    color: #f5deb3;
    padding: 8px 12px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
}

.cheat-resource-selector select:hover {
    background: linear-gradient(135deg, #8b4513, #cd853f);
    border-color: #cd853f;
}

.cheat-resource-selector select:focus {
    outline: none;
    border-color: #daa520;
    box-shadow: 0 0 8px rgba(218, 165, 32, 0.3);
}

.cheat-resource-selector select optgroup {
    background: #2c1810;
    color: #daa520;
    font-weight: bold;
    padding: 5px;
}

.cheat-resource-selector select option {
    background: #2c1810;
    color: #e0d0c0;
    padding: 5px;
}

/* =================================================================
   4. RESOURCE PREVIEW
   ================================================================= */
.cheat-resource-preview {
    background: linear-gradient(135deg, rgba(42, 24, 16, 0.8), rgba(26, 15, 10, 0.8));
    border: 2px solid #8b4513;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.cheat-preview-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(139, 69, 19, 0.3);
    border-radius: 8px;
}

.cheat-preview-icon {
    font-size: 32px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border: 2px solid #8b4513;
}

.cheat-preview-details {
    flex: 1;
}

.cheat-preview-name {
    color: #daa520;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
}

.cheat-preview-current {
    color: #e0d0c0;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

#cheat-current-value {
    color: #32cd32;
    font-weight: bold;
}

/* =================================================================
   5. AMOUNT CONTROLS
   ================================================================= */
.cheat-amount-controls {
    margin-bottom: 15px;
}

.cheat-amount-controls label {
    display: block;
    color: #e0d0c0;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.cheat-amount-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#cheat-amount-input {
    background: linear-gradient(135deg, #654321, #8b4513);
    border: 2px solid #8b4513;
    border-radius: 6px;
    color: #f5deb3;
    padding: 10px 12px;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s;
}

#cheat-amount-input:hover {
    background: linear-gradient(135deg, #8b4513, #cd853f);
    border-color: #cd853f;
}

#cheat-amount-input:focus {
    outline: none;
    border-color: #daa520;
    box-shadow: 0 0 8px rgba(218, 165, 32, 0.3);
}

.cheat-quick-amounts {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.cheat-quick-btn {
    background: linear-gradient(135deg, #daa520, #ffd700);
    border: 1px solid #ffd700;
    border-radius: 4px;
    color: #2c1810;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
    min-width: 45px;
}

.cheat-quick-btn:hover {
    background: linear-gradient(135deg, #ffd700, #ffec8c);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.cheat-quick-btn:active {
    transform: translateY(0);
}

/* =================================================================
   6. RESOURCE ACTIONS
   ================================================================= */
.cheat-resource-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.cheat-add {
    background: linear-gradient(135deg, #32cd32, #228b22);
    border-color: #32cd32;
    min-width: 100px;
}

.cheat-add:hover {
    background: linear-gradient(135deg, #98fb98, #32cd32);
}

.cheat-set {
    background: linear-gradient(135deg, #4169e1, #1e90ff);
    border-color: #4169e1;
    min-width: 100px;
}

.cheat-set:hover {
    background: linear-gradient(135deg, #87ceeb, #4169e1);
}

.cheat-remove {
    background: linear-gradient(135deg, #ff6347, #dc143c);
    border-color: #ff6347;
    min-width: 100px;
}

.cheat-remove:hover {
    background: linear-gradient(135deg, #ff7f7f, #ff6347);
}

/* =================================================================
   7. WARNING SECTION
   ================================================================= */
.cheats-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.2), rgba(255, 69, 0, 0.2));
    border: 2px solid #ff8c00;
    border-radius: 8px;
    padding: 12px;
    margin-top: 20px;
}

.warning-icon {
    font-size: 20px;
    color: #ff8c00;
    flex-shrink: 0;
}

.warning-text {
    color: #e0d0c0;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    line-height: 1.4;
}

/* =================================================================
   8. CHEAT NOTIFICATIONS
   ================================================================= */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.cheat-notification {
    animation: slideIn 0.3s ease-out;
}

/* =================================================================
   9. RESPONSIVE DESIGN
   ================================================================= */
@media (max-width: 768px) {
    .cheats-quick-actions {
        flex-direction: column;
    }
    
    .cheat-btn {
        min-width: auto;
        flex: none;
    }
    
    .cheat-resource-actions {
        flex-direction: column;
    }
    
    .cheat-resource-actions .cheat-btn {
        min-width: auto;
    }
    
    .cheat-quick-amounts {
        justify-content: stretch;
    }
    
    .cheat-quick-btn {
        flex: 1;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .cheats-individual {
        padding: 10px;
    }
    
    .cheat-preview-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .cheat-preview-icon {
        font-size: 28px;
        width: 36px;
        height: 36px;
        align-self: center;
    }
    
    .cheat-amount-input-group {
        gap: 8px;
    }
    
    .cheat-quick-amounts {
        gap: 5px;
    }
    
    .cheat-quick-btn {
        padding: 5px 8px;
        font-size: 11px;
    }
}

/* =================================================================
   10. DARK MODE ADJUSTMENTS (if needed)
   ================================================================= */
.settings-body .cheats-section {
    border-top: 1px solid rgba(139, 69, 19, 0.5);
    padding-top: 20px;
    margin-top: 20px;
}

/* Special styling for the cheats section title */
.settings-section:has(.cheats-section) h4 {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.1), rgba(204, 51, 51, 0.1));
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 8px;
    padding: 10px;
}

/* =================================================================
   11. CONFIRMATION DIALOG
   ================================================================= */
.cheat-confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cheatsDialogAppear 0.3s ease-out;
}

.cheat-confirm-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.cheat-confirm-content {
    position: relative;
    background: linear-gradient(145deg, #3c1e14, #2a1208);
    border: 3px solid #ff6347;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(255, 99, 71, 0.4);
    min-width: 400px;
    max-width: 500px;
    animation: confirmSlide 0.4s ease-out;
}

@keyframes confirmSlide {
    from {
        transform: scale(0.7) translateY(-30px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.cheat-confirm-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px 15px;
    border-bottom: 2px solid #ff6347;
    background: linear-gradient(135deg, #ff6347, #dc143c);
    border-radius: 12px 12px 0 0;
}

.cheat-confirm-icon {
    font-size: 24px;
    animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 140, 0, 0.7));
    }
    50% { 
        transform: scale(1.1);
        filter: drop-shadow(0 0 15px rgba(255, 140, 0, 1));
    }
}

.cheat-confirm-header h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.cheat-confirm-body {
    padding: 25px;
    text-align: center;
}

.cheat-confirm-message {
    color: #e0d0c0;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cheat-confirm-footer {
    display: flex;
    gap: 15px;
    padding: 20px 25px 25px;
    justify-content: center;
    border-top: 1px solid rgba(255, 99, 71, 0.3);
}

.cheat-confirm-btn {
    padding: 12px 25px;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.cheat-confirm-cancel {
    background: linear-gradient(135deg, #696969, #808080);
    border-color: #696969;
    color: #ffffff;
}

.cheat-confirm-cancel:hover {
    background: linear-gradient(135deg, #808080, #a9a9a9);
    border-color: #808080;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.cheat-confirm-yes {
    background: linear-gradient(135deg, #ff6347, #dc143c);
    border-color: #ff6347;
    color: #ffffff;
    animation: dangerGlow 3s ease-in-out infinite;
}

@keyframes dangerGlow {
    0%, 100% { 
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    }
    50% { 
        box-shadow: 0 5px 20px rgba(255, 99, 71, 0.6);
    }
}

.cheat-confirm-yes:hover {
    background: linear-gradient(135deg, #ff7f7f, #ff6347);
    border-color: #ff7f7f;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 99, 71, 0.8) !important;
    animation: none;
}

.cheat-confirm-btn:active {
    transform: translateY(0);
}

/* Mobile responsiveness for confirmation dialog */
@media (max-width: 768px) {
    .cheat-confirm-content {
        min-width: 320px;
        max-width: 90vw;
        margin: 0 20px;
    }
    
    .cheat-confirm-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .cheat-confirm-btn {
        min-width: auto;
        width: 100%;
    }
}