body {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    font-family: 'Arial', sans-serif;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Prevent double-tap zoom and improve mobile touch */
* {
    touch-action: manipulation;
}

/* Allow text selection in input fields */
input, textarea {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.indicator-bar {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.indicator-fill {
    height: 100%;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.gear-indicator {
    width: 350px;
    height: 262px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 70px auto 50px auto;
    transition: all 0.3s ease;
}

.gear-indicator svg {
    width: 350px !important;
    height: 248px !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 350px !important;
    min-height: 248px !important;
    display: block !important;
}

.gear-1 { border-color: #ffc107; }
.gear-2 { border-color: #fd7e14; }
.gear-3 { border-color: #dc3545; }
.gear-4 { border-color: #28a745; }
.gear-5 { border-color: #6f42c1; }
.gear-6 { border-color: #0d6efd; }

/* Removed duplicate mobile media query - consolidated below */

.dice-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    margin: 0 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.dice-card-container {
    transition: all 0.3s ease;
    padding: 50px 20px !important;
}

/* Altezza massima quando le probabilità sono visibili */
.dice-card-container.show-probabilities {
    min-height: 1000px;
}

.dice-card-container.show-probabilities .dice-info {
    min-height: 280px;
}

/* Altezza ridotta quando le probabilità sono nascoste */
.dice-card-container.hide-probabilities {
    min-height: 850px;
}

.dice-card-container.hide-probabilities .dice-info {
    min-height: 80px;
}

.component-card {
    border: none;
    border-radius: 10px;
    margin-bottom: 20px;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.component-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.tire-icon { color: #495057; }
.brake-icon { color: #dc3545; }
.engine-icon { color: #fd7e14; }
.body-icon { color: #0d6efd; }
.fuel-icon { color: #ffc107; }
.grip-icon { color: #17a2b8; }

.config-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.btn-custom {
    border-radius: 20px;
    padding: 12px 24px;
    margin: 8px;
    min-height: 48px;
    font-size: 1.1rem;
}

.modal-content {
    border-radius: 15px;
    background: white;
    border: 4px solid;
}

.modal-content.dice-border-1 { border-color: #FFEB3B; }
.modal-content.dice-border-2 { border-color: #F57C00; }
.modal-content.dice-border-3 { border-color: #D32F2F; }
.modal-content.dice-border-4 { border-color: #388E3C; }
.modal-content.dice-border-5 { border-color: #7B1FA2; }
.modal-content.dice-border-6 { border-color: #1565C0; }

.points-display {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    text-align: center;
}

.points-remaining {
    color: #ffc107;
}

.points-zero {
    color: #28a745;
}

@media (max-width: 768px) {
    .gear-indicator {
        width: 175px;
        height: 131px;
        margin: 80px auto 40px auto;
    }
    
    .gear-indicator svg {
        width: 175px !important;
        height: 124px !important;
    }
    
    .component-icon {
        font-size: 1.5rem;
    }
    
    .dice-card-container {
        padding: 40px 15px !important;
    }
    
    .dice-card-container.show-probabilities {
        min-height: 740px;
    }
    
    .dice-card-container.hide-probabilities {
        min-height: 640px;
    }
    
    /* Mobile-friendly buttons */
    .btn-custom {
        padding: 16px 28px;
        margin: 10px 5px;
        min-height: 56px;
        font-size: 1.2rem;
    }
    
    /* Better spacing for component cards */
    .component-card {
        padding: 20px !important;
        margin-bottom: 25px !important;
    }
    
    /* Larger touch targets for form controls */
    .form-control, .form-select {
        min-height: 48px;
        font-size: 1.1rem;
    }
    
    .form-check-input {
        width: 1.5em;
        height: 1.5em;
    }
    
    .form-range {
        height: 1.5rem;
    }

    /* Fullscreen setup for mobile */
    .mobile-fullscreen-setup .modal-dialog {
        max-width: none !important;
        margin: 0 !important;
        height: 100vh !important;
        width: 100vw !important;
    }
    
    .mobile-fullscreen-setup .modal-content {
        height: 100vh !important;
        border-radius: 0 !important;
        border: none !important;
    }
    
    .mobile-fullscreen-setup .modal-body {
        padding: 20px !important;
        overflow-y: auto !important;
        max-height: calc(100vh - 140px) !important;
    }
    
    /* Hide main dashboard during setup on mobile */
    .setup-active .main-dashboard {
        display: none !important;
    }
    
    .mobile-fullscreen-setup {
        background: rgba(0,0,0,0.95) !important;
    }
    
    .mobile-fullscreen-setup .modal-header {
        padding: 15px 20px !important;
        border-bottom: 2px solid #dee2e6 !important;
    }
    
    .mobile-fullscreen-setup .modal-footer {
        padding: 15px 20px !important;
        border-top: 2px solid #dee2e6 !important;
    }
}


/* Rules View Styles - Full Screen Interface */
#rulesView {
    min-height: calc(100vh - 200px);
    background: #f8f9fa;
    padding: 20px 0;
}

/* Desktop Layout */
@media (min-width: 1200px) {
    #rulesView .container-fluid {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .rules-container-desktop {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        margin-top: 20px;
    }
    
    .rules-search {
        position: sticky;
        top: 20px;
        margin-bottom: 30px;
    }
}

@media (min-width: 1600px) {
    .rules-container-desktop {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 32px;
    }
}

.rules-search {
    position: sticky;
    top: 80px;
    background: white;
    z-index: 1000;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.rules-section {
    margin-bottom: 20px;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.rules-section:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* Tablet and medium screens */
@media (min-width: 768px) and (max-width: 1199px) {
    #rulesView {
        padding: 20px 0;
    }
    
    .rules-search {
        padding: 20px 24px;
        border-radius: 14px;
        top: 75px;
    }
    
    .rules-section {
        margin-bottom: 20px;
    }
    
    .rules-section-header {
        padding: 18px 22px;
    }
    
    .rules-section-title {
        font-size: 1.1rem;
        gap: 14px;
    }
    
    .rules-section-toggle {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }
    
    .rule-item {
        margin: 0 18px 14px 18px;
    }
    
    .rule-header {
        padding: 15px 20px;
        gap: 14px;
    }
    
    .rule-symbol {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }
    
    .rule-title {
        font-size: 0.98rem;
    }
    
    .rule-toggle {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }
    
    .rule-content-inner {
        padding: 16px 20px;
        font-size: 0.9rem;
    }
}

/* Desktop enhancements */
@media (min-width: 992px) {
    .rules-section {
        margin-bottom: 24px;
        break-inside: avoid;
    }
    
    .rules-section-header {
        padding: 24px 28px;
        cursor: pointer;
    }
    
    .rules-section-header:hover {
        background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    }
    
    .rules-section-title {
        font-size: 1.2rem;
        gap: 16px;
    }
    
    .rules-section-count {
        font-size: 0.85rem;
        padding: 6px 12px;
        min-width: 32px;
    }
    
    .rules-section-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .rule-item {
        margin: 0 20px 16px 20px;
    }
    
    .rule-header {
        padding: 18px 24px;
        gap: 16px;
    }
    
    .rule-symbol {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .rule-id {
        font-size: 0.9rem;
        min-width: 70px;
    }
    
    .rule-title {
        font-size: 1rem;
    }
    
    .rule-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    .rule-content-inner {
        padding: 20px 24px;
        font-size: 0.95rem;
    }
}

.rules-section-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
}

.rules-section-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.rules-section-header.expanded {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-bottom-color: #2196f3;
}

.rules-section-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, #007bff, #0056b3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rules-section-header.expanded::before {
    opacity: 1;
}

.rules-section-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

.rules-section-count {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    min-width: 28px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rules-section-toggle {
    font-size: 1.4rem;
    transition: all 0.3s ease;
    color: #6c757d;
    background: rgba(108, 117, 125, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rules-section-toggle.expanded {
    transform: rotate(90deg);
    color: #2196f3;
    background: rgba(33, 150, 243, 0.1);
}

.rules-section-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafbfc;
}

.rules-section-content.expanded {
    max-height: 2000px;
    padding: 8px 0;
}

.rule-item {
    margin: 0 16px 12px 16px;
    border-radius: 12px;
    background: white;
    border: 1px solid #e3e8ee;
    transition: all 0.2s ease;
    overflow: hidden;
}

.rule-item:last-child {
    margin-bottom: 8px;
}

.rule-item:hover {
    background: #f8f9fa;
    border-color: #c1c9d2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.rule-header {
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    user-select: none;
    transition: all 0.2s ease;
}

.rule-header:hover {
    background: rgba(0,0,0,0.02);
}

.rule-symbol {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.rule-symbol-official {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.rule-symbol-homebrew {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #212529;
}

.rule-id {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.85rem;
    color: #6c757d;
    min-width: 60px;
    flex-shrink: 0;
}

.rule-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #212529;
    flex: 1;
    line-height: 1.3;
}

.rule-toggle {
    font-size: 1.1rem;
    transition: all 0.3s ease;
    color: #6c757d;
    flex-shrink: 0;
    background: rgba(108, 117, 125, 0.08);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rule-toggle.expanded {
    transform: rotate(90deg);
    color: #2196f3;
    background: rgba(33, 150, 243, 0.1);
}

.rule-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fafafa;
}

.rule-content.expanded {
    max-height: 500px;
}

.rule-content-inner {
    padding: 15px;
    color: #495057;
    line-height: 1.5;
    font-size: 0.9rem;
}

.rule-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.rule-tag {
    background: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
}

.search-highlight {
    background-color: #fff3cd;
    font-weight: bold;
    padding: 1px 2px;
    border-radius: 2px;
}

.no-rules-found {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.rules-stats {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
}

.expand-all-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.expand-all-controls .btn {
    font-size: 0.8rem;
    padding: 4px 8px;
}

/* Desktop search enhancements */
@media (min-width: 992px) {
    .rules-search {
        padding: 24px 32px;
        border-radius: 16px;
    }
    
    .rules-search .input-group {
        margin-bottom: 20px;
    }
    
    .rules-search .input-group .form-control {
        font-size: 1rem;
        padding: 12px 16px;
        border-radius: 12px 0 0 12px;
    }
    
    .rules-search .input-group-text {
        padding: 12px 16px;
        border-radius: 0 12px 12px 0;
        background: #f8f9fa;
        border-left: none;
    }
    
    .expand-all-controls {
        justify-content: center;
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .expand-all-controls .btn {
        font-size: 0.9rem;
        padding: 8px 16px;
        border-radius: 8px;
    }
    
    .rules-stats {
        font-size: 0.9rem;
        padding: 12px 20px;
        border-radius: 10px;
    }
}

/* Bonus Table Styles */
.bonus-table {
    font-size: 0.9rem;
}

.bonus-table th {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}

.bonus-table .table-light th {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    color: #495057;
    font-size: 0.8rem;
}

.bonus-table td {
    text-align: center;
    vertical-align: middle;
    font-weight: 500;
}

.bonus-table .action-cell {
    background: #f8f9fa;
    font-weight: 600;
    text-align: left;
    padding-left: 15px;
}

.bonus-table .movement-cell {
    background: #f1f3f4;
    text-align: left;
    padding-left: 15px;
}

.bonus-positive {
    color: #28a745;
    font-weight: bold;
}

.bonus-negative {
    color: #dc3545;
    font-weight: bold;
}

.bonus-neutral {
    color: #6c757d;
}

.bonus-special {
    color: #ffc107;
    font-weight: bold;
}

.bonus-table #tableHeader {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

.bonus-table tbody td:last-child {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    min-width: 80px;
}

/* Fullscreen Matrix Table Styles */
.fullscreen-table {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f0f2f5;
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.fullscreen-header {
    background: white;
    padding: 20px;
    border-bottom: 3px solid #007bff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.fullscreen-content {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

.matrix-container {
    overflow-x: auto;
    overflow-y: auto;
    width: 100%;
    height: 100%;
    padding-bottom: 20px;
}

.matrix-table {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 3px solid #e9ecef;
    min-width: 1100px;
    margin: 0 auto;
}

.matrix-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    table-layout: fixed;
}

.matrix-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.matrix-header th {
    padding: 20px;
    text-align: center;
    font-weight: 800;
    font-size: 1.2rem;
    border: 2px solid rgba(255,255,255,0.2);
}

.matrix-header th:first-child {
    width: 200px;
    min-width: 200px;
}

.matrix-header th:not(:first-child) {
    width: 300px;
    min-width: 300px;
}

.pneumatico-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 20px;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    border: 2px solid rgba(255,255,255,0.2);
    vertical-align: middle;
    width: 200px;
    min-width: 200px;
}

.matrix-cell {
    border: 2px solid #dee2e6;
    padding: 0;
    background: #fafbfc;
    vertical-align: top;
    width: 300px;
    min-width: 300px;
    height: 350px;
    min-height: 350px;
}

.cell-content {
    padding: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.action-group {
    background: white;
    border-radius: 6px;
    padding: 6px;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
    min-height: fit-content;
}

.action-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 4px;
    text-align: center;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 4px;
}

.movement-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    font-size: 0.8rem;
}

.movement-name {
    font-weight: 600;
    color: #212529;
    flex: 1;
    font-size: 0.75rem;
}

.movement-values {
    display: flex;
    gap: 2px;
    flex: 1;
    justify-content: flex-end;
}

.value-chip {
    background: white;
    border: 1px solid #dee2e6;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.7rem;
    min-width: 28px;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .bonus-table {
        font-size: 0.8rem;
    }
    
    .bonus-table th,
    .bonus-table td {
        padding: 8px 4px;
    }
    
    .bonus-table tbody td:last-child {
        font-size: 1rem;
        min-width: 60px;
    }
    
    .fullscreen-header {
        padding: 15px;
        gap: 15px;
    }
    
    .fullscreen-header h3 {
        font-size: 1.2rem;
    }
    
    .fullscreen-content {
        padding: 10px;
    }
    
    .matrix-container {
        padding-bottom: 10px;
    }
    
    .matrix-table {
        border-radius: 12px;
        min-width: 900px;
    }
    
    .matrix-header th {
        padding: 12px 8px;
        font-size: 1rem;
    }
    
    .matrix-header th:first-child {
        width: 150px;
        min-width: 150px;
    }
    
    .matrix-header th:not(:first-child) {
        width: 250px;
        min-width: 250px;
    }
    
    .pneumatico-header {
        padding: 12px 8px;
        font-size: 1rem;
        width: 150px;
        min-width: 150px;
    }
    
    .matrix-cell {
        width: 250px;
        min-width: 250px;
        height: 280px;
        min-height: 280px;
    }
    
    .cell-content {
        padding: 10px;
        gap: 6px;
    }
    
    .action-group {
        padding: 6px;
    }
    
    .action-title {
        font-size: 0.8rem;
        padding: 3px;
    }
    
    .movement-name {
        font-size: 0.7rem;
    }
    
    .value-chip {
        font-size: 0.65rem;
        padding: 1px 3px;
        min-width: 24px;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .matrix-cell {
        height: 220px;
        min-height: 220px;
    }
    
    .cell-content {
        padding: 8px;
        gap: 4px;
    }
    
    .action-group {
        padding: 4px;
    }
    
    .action-title {
        font-size: 0.7rem;
        padding: 2px;
    }
}

/* Header responsive styles */
@media (max-width: 576px) {
    .dashboard-card h1 {
        font-size: 1.5rem;
    }
    
    .btn-custom {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
    
    .d-flex.gap-2 {
        gap: 8px !important;
    }
}

@media (max-width: 480px) {
    .d-flex.justify-content-center {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-custom {
        min-width: 140px;
        margin-bottom: 8px;
    }
}

/* Improved mobile responsiveness */
@media (max-width: 768px) {
    #rulesView {
        padding: 15px 0;
    }
    
    .rules-search {
        padding: 15px;
        margin-bottom: 15px;
        top: 70px;
        border-radius: 12px;
    }
    
    .rules-section {
        margin-bottom: 16px;
        border-radius: 12px;
    }
    
    .rules-section-header {
        padding: 16px 18px;
    }
    
    .rules-section-title {
        font-size: 1rem;
        gap: 10px;
    }
    
    .rules-section-toggle {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }
    
    .rule-item {
        margin: 0 12px 10px 12px;
        border-radius: 10px;
    }
    
    .rule-header {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .rule-symbol {
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
    }
    
    .rule-title {
        font-size: 0.9rem;
    }
    
    .rule-toggle {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
    
    .rule-content-inner {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    .expand-all-controls {
        flex-direction: column;
        gap: 6px;
    }
    
    .expand-all-controls .btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}
