:root {
    --primary: #4a9eff;
    --primary-dark: #2979ff;
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
    --dark: #333;
    --light: #fff;
    --gray: #666;
    --gray-light: #f5f5f5;
    --border: #ddd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    background: #f0f2f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.subtitle {
    font-size: 1rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto 20px;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 15px 25px;
    background: var(--light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 120px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    color: var(--dark);
    transition: var(--transition);
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: var(--gray-light);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.cards-container {
    margin-bottom: 40px;
}

.collapsible-section {
    margin-bottom: 20px;
}

.section-header {
    background: var(--light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.section-header:hover {
    background: var(--gray-light);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-count {
    background: var(--gray-light);
    color: var(--gray);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.section-toggle {
    font-size: 1.2rem;
}

.section-content {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 15px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.section-content.expanded {
    max-height: 5000px;
    opacity: 1;
}

@media (max-width: 768px) {
    .section-content {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    border: 1px solid var(--border);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--gray-light);
    color: var(--gray);
}

.badge-developer { background: #e3f2fd; color: #1976d2; }
.badge-about { background: #e8f5e9; color: #388e3c; }
.badge-accessibility { background: #fff8e1; color: #f57c00; }
.badge-security { background: #ffebee; color: #d32f2f; }
.badge-vpn { background: #f3e5f5; color: #7b1fa2; }
.badge-apn { background: #e8f5e9; color: #388e3c; }
.badge-credentials { background: #fff8e1; color: #f57c00; }
.badge-search { background: #f5f5f5; color: #616161; }
.badge-deviceadmin { background: #f3e5f5; color: #7b1fa2; }
.badge-system { background: #e3f2fd; color: #1976d2; }
.badge-suggestion { background: #fff8e1; color: #f57c00; }
.badge-nativesettings { background: #e8f5e9; color: #388e3c; }
.badge-filemanager { background: #e3f2fd; color: #1565c0; }
.badge-custom { background: #f5f5f5; color: #616161; }

.card-type {
    font-size: 0.8rem;
    color: var(--gray);
    background: var(--gray-light);
    padding: 3px 8px;
    border-radius: 8px;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.card-desc {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.card-path {
    background: var(--gray-light);
    padding: 10px;
    border-radius: var(--radius);
    font-family: 'SF Mono', 'Cascadia Code', monospace;
    font-size: 0.85rem;
    margin-bottom: 15px;
    overflow-x: auto;
    white-space: nowrap;
    border: 1px solid var(--border);
    cursor: pointer;
    color: var(--primary-dark);
}

.card-path:hover {
    background: #e3f2fd;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    flex: 1;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
}

.btn-secondary:hover {
    background: var(--gray-light);
}

.btn-warning {
    background: var(--warning);
    color: white;
    border-color: var(--warning);
}

.btn-warning:hover {
    background: #f57c00;
    border-color: #f57c00;
}

.custom-form-container {
    background: var(--light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.form-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input {
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.form-help {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 15px;
    padding: 12px;
    background: var(--gray-light);
    border-radius: var(--radius);
}

.form-help ul {
    padding-left: 20px;
    margin: 8px 0;
}

.form-help li {
    margin-bottom: 4px;
}

.footer {
    text-align: center;
    padding: 20px;
    color: var(--gray);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

.footer p {
    margin: 5px 0;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--light);
    color: var(--dark);
    padding: 12px 24px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border: 1px solid var(--border);
    opacity: 0;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast-success { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.toast-error { background: #ffebee; color: #c62828; border-color: #ef9a9a; }
.toast-warning { background: #fff8e1; color: #e65100; border-color: #ffcc80; }
.toast-info { background: #e3f2fd; color: #1565c0; border-color: #90caf9; }
