.rules-header {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
}

.rules-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: var(--gradient);
    border-radius: 1px;
}

.rules-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(0, 226, 223, 0.1);
    border: 1px solid rgba(0, 226, 223, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.rules-header-icon .material-icons {
    font-size: 28px;
    color: var(--primary-color);
}

.rules-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
}

.rules-subtitle {
    font-size: 16px;
    color: var(--text-color-dark);
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.5;
}

.rules-search {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
}

.rules-search input[type="text"] {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--background-light);
    color: var(--text-color);
    font-size: 16px;
    font-family: var(--font-main);
    outline: none;
    transition: all 0.3s ease;
}

.rules-search input[type="text"]::placeholder {
    color: var(--text-color-dark);
}

.rules-search input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 226, 223, 0.1);
}

.rules-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color-dark);
    font-size: 20px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.rules-search:focus-within .rules-search-icon {
    color: var(--primary-color);
}

.rules-counter {
    text-align: center;
    font-size: 13px;
    color: var(--text-color-dark);
    margin-top: 12px;
    min-height: 20px;
}

.rules-list {
    max-width: 800px;
    margin: 30px auto 0;
}

.rule-card {
    background: linear-gradient(160deg, var(--background-light), var(--background-surface));
    border-radius: 14px;
    padding: 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: ruleFadeIn 0.3s ease;
}

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

.rule-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.rule-card-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
}

.rule-uid-badge {
    flex-shrink: 0;
    min-width: 48px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 226, 223, 0.1);
    border: 1px solid rgba(0, 226, 223, 0.2);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    padding: 0 10px;
}

.rule-card-body {
    flex: 1;
    min-width: 0;
}

.rule-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 6px;
    line-height: 1.4;
}

.rule-description {
    font-size: 15px;
    color: var(--text-color-dark);
    line-height: 1.6;
    margin-bottom: 0;
}

.rule-card-expand {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
}

.rule-card-expand .material-icons {
    font-size: 20px;
    color: var(--text-color-dark);
    transition: transform 0.3s ease;
}

.rule-card.expanded .rule-card-expand {
    background: rgba(0, 226, 223, 0.1);
}

.rule-card.expanded .rule-card-expand .material-icons {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.rule-card-details {
    display: none;
    border-top: 1px solid var(--border-color);
    padding: 16px 24px 20px;
    background: rgba(0, 0, 0, 0.1);
}

.rule-card.expanded .rule-card-details {
    display: block;
    animation: detailsSlide 0.3s ease;
}

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

.rule-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.rule-detail-row:last-child {
    margin-bottom: 0;
}

.rule-detail-row .material-icons {
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.rule-detail-row .detail-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-color-dark);
    margin-bottom: 4px;
}

.rule-detail-row .detail-value {
    font-size: 15px;
    color: var(--text-color);
    line-height: 1.5;
}

.rule-detail-punishment .material-icons {
    color: var(--danger-color);
}

.rule-detail-punishment .detail-value {
    color: #fca5a5;
    font-weight: 600;
}

.rule-detail-examples .material-icons {
    color: var(--primary-color);
}

.examples-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.examples-list li {
    padding: 8px 12px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.5;
    border-left: 3px solid rgba(0, 226, 223, 0.3);
}

.examples-list li:last-child {
    margin-bottom: 0;
}

.rules-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-color-dark);
}

.rules-empty .material-icons {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.rules-empty p {
    font-size: 16px;
}

.rules-initial-hint {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-color-dark);
}

.rules-initial-hint .material-icons {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.rules-initial-hint p {
    font-size: 15px;
}

@media (max-width: 600px) {
    .rules-title {
        font-size: 24px;
    }

    .rule-card-top {
        padding: 16px 16px;
        gap: 12px;
    }

    .rule-card-details {
        padding: 14px 16px 18px;
    }

    .rule-title {
        font-size: 15px;
    }
}
