/// RFC 27 验收 — CSS-like stylesheet parser

use lv_tui::style_parser::StyleSheet;

fn main() {
    let css = "
        // Type selector
        Counter {
            fg: green;
            bold: true;
        }

        // Class selector
        .card {
            border: rounded;
            padding: 1;
        }

        // ID selector
        #header {
            bg: blue;
            fg: white;
            height: 3;
        }
    ";

    let sheet = StyleSheet::parse(css).unwrap();
    println!("Parsed {} rules:", sheet.rules.len());
    for rule in &sheet.rules {
        println!("  {:?} → fg:{:?} bg:{:?} border:{:?} padding:{:?}",
            rule.selector, rule.style.fg, rule.style.bg, rule.style.border, rule.style.padding);
    }
}
