/*
 * Windows Debloater Tool - Transparency-Focused Styling
 * Pure Black Neumorphic Design - Safety-First Interface
 */

/* ===== PAGE LAYOUT ===== */
.debloater-page {
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
    padding-bottom: 3rem;
}

/* ===== HERO SECTION ===== */
.debloater-hero {
    position: relative;
    padding: 5rem 2rem 4rem;
    text-align: center;
    background: linear-gradient(135deg, #000000 0%, #0f0f0f 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.debloater-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(white 1px, transparent 1px);
    background-size: 100px 100px;
    opacity: 0.02;
    pointer-events: none;
}

.debloater-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.debloater-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.title-accent {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.debloater-subtitle {
    font-size: 1.05rem;
    color: #a0a0a0;
    margin: 1rem auto;
    max-width: 700px;
    line-height: 1.6;
}

/* ===== SAFETY WARNING ===== */
#system-warning {
    display: none;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(255, 152, 0, 0.1));
    border: 1px solid #FF6B6B;
    border-left: 4px solid #FF6B6B;
    padding: 1.5rem;
    margin: 2rem auto;
    border-radius: 8px;
    max-width: 900px;
    color: #FFB74D;
    font-size: 0.95rem;
    line-height: 1.6;
}

#system-warning strong {
    color: #FF6B6B;
}

/* ===== CONTROL PANEL ===== */
.debloater-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    max-width: 100%;
    margin: 0 auto;
}

.control-btn {
    padding: 0.85rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#apply-tweaks-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    color: white;
    font-weight: 700;
}

#apply-tweaks-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049, #3d8b40);
}

#apply-tweaks-btn:disabled {
    background: linear-gradient(135deg, #666, #555);
    opacity: 0.6;
}

/* ===== TWEAKS CONTAINER ===== */
#tweaks-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ===== CATEGORY SECTION ===== */
.tweak-category {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tweak-category:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    user-select: none;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-icon {
    font-size: 1.8rem;
}

.category-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.toggle-category-btn {
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
}

.toggle-category-btn:hover {
    color: #e0e0e0;
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* ===== TWEAKS LIST ===== */
.tweaks-list {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: max-height 0.3s ease;
}

.tweaks-list.collapsed {
    max-height: 0;
    padding: 0;
    overflow: hidden;
}

/* ===== TWEAK CARD ===== */
.tweak-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1.3rem;
    transition: all 0.3s ease;
}

.tweak-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tweak-card.selected {
    background: rgba(76, 175, 80, 0.08);
    border-color: rgba(76, 175, 80, 0.3);
}

.tweak-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #4CAF50;
    border-color: #4CAF50;
    box-shadow: inset 0 0 0 2px #0a0a0a;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: bold;
}

.tweak-title-section {
    flex: 1;
}

.tweak-title {
    margin: 0 0 0.4rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
}

.tweak-description {
    margin: 0;
    font-size: 0.9rem;
    color: #a0a0a0;
    line-height: 1.4;
}

/* ===== TWEAK DETAILS ===== */
.tweak-details {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.8rem;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.detail-label {
    font-weight: 600;
    color: #b0b0b0;
    min-width: 120px;
}

.detail-value {
    color: #e0e0e0;
}

.risk-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ===== TWEAK ACTIONS ===== */
.tweak-actions {
    display: flex;
    gap: 0.8rem;
}

.view-script-btn,
.copy-script-btn {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-script-btn:hover,
.copy-script-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.copy-script-btn {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
    color: #4CAF50;
}

.copy-script-btn:hover {
    background: rgba(76, 175, 80, 0.2);
}

/* ===== MODALS ===== */
.script-modal,
.apply-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content,
.apply-modal-content {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #ffffff;
}

.modal-body {
    padding: 1.5rem;
    max-height: calc(90vh - 150px);
    overflow-y: auto;
}

.script-info {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-left: 4px solid #FFC107;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    color: #FFD54F;
    font-size: 0.9rem;
}

.script-info p {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.script-info ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.script-info li {
    margin: 0.3rem 0;
}

.script-container {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.script-container code {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #90EE90;
    line-height: 1.5;
}

.script-container pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.modal-footer,
.apply-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    justify-content: flex-end;
}

.btn-primary,
.btn-secondary {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== APPLY MODAL SPECIFIC ===== */
.safety-notice {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(255, 152, 0, 0.1));
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-left: 4px solid #FF9800;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    color: #FFB74D;
}

.safety-notice strong {
    color: #FF9800;
    display: block;
    margin-bottom: 0.5rem;
}

.safety-notice ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.safety-notice li {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.selected-tweaks-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tweak-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 1rem;
}

.tweak-item h4 {
    margin: 0 0 0.8rem 0;
    color: #ffffff;
    font-size: 1rem;
}

.tweak-script-block {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.8rem;
}

.tweak-script-block pre {
    margin: 0 0 0.8rem 0;
}

.tweak-script-block code {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #90EE90;
    line-height: 1.4;
}

.btn-copy-script {
    width: 100%;
    padding: 0.6rem;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4CAF50;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-copy-script:hover {
    background: rgba(76, 175, 80, 0.2);
}

/* ===== SCROLLBAR STYLING ===== */
.modal-body::-webkit-scrollbar,
.selected-tweaks-list::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track,
.selected-tweaks-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb,
.selected-tweaks-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover,
.selected-tweaks-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .debloater-hero {
        padding: 3rem 1.5rem 2.5rem;
    }

    .debloater-title {
        font-size: 1.8rem;
    }

    .debloater-subtitle {
        font-size: 0.95rem;
    }

    .debloater-controls {
        padding: 1.5rem;
        gap: 0.8rem;
    }

    .control-btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
        flex: 1;
        min-width: 120px;
    }

    #tweaks-container {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }

    .tweak-details {
        grid-template-columns: 1fr;
    }

    .tweak-actions {
        flex-direction: column;
    }

    .view-script-btn,
    .copy-script-btn {
        width: 100%;
    }

    .modal-content,
    .apply-modal-content {
        max-width: 95vw;
        border-radius: 8px;
    }

    .modal-footer,
    .apply-footer {
        flex-direction: column-reverse;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .debloater-hero {
        padding: 2rem 1rem 1.5rem;
    }

    .debloater-title {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .debloater-subtitle {
        font-size: 0.9rem;
    }

    .category-header {
        padding: 1rem;
    }

    .category-header h2 {
        font-size: 1.1rem;
    }

    .tweak-details {
        gap: 0.5rem;
    }

    .detail-label {
        min-width: 100px;
        font-size: 0.85rem;
    }

    .detail-value,
    .detail-label {
        font-size: 0.85rem;
    }
}
