:root {
    /* Default: Dynamic Sports (Stitch High-Contrast) */
    --primary-color: var(--md-sys-color-primary);
    --secondary-color: var(--md-sys-color-secondary);
    --bg-color: var(--md-sys-color-surface);
    --surface-color: var(--md-sys-color-surface-variant);
    --text-primary: var(--md-sys-color-on-surface);
    --border-radius: var(--md-sys-shape-corner-small);
    --card-shadow: 4px 4px 0 var(--md-sys-color-primary-container);
    --glass-blur: 0;
    --glass-bg: var(--md-sys-color-surface-variant);
}

[data-theme="glassy"] {
    /* Glassy & Clean (Stitch Translucent) */
    --bg-color: #f0f2f5;
    --surface-color: rgba(255, 255, 255, 0.4);
    --border-radius: var(--md-sys-shape-corner-medium);
    --card-shadow: var(--md-sys-elevation-level1);
    --glass-blur: 16px;
    --glass-bg: rgba(255, 255, 255, 0.45);
}

[data-theme="app"] {
    /* App-like PWA (Stitch Adaptive) */
    --bg-color: #ffffff;
    --surface-color: var(--md-sys-color-primary-container);
    --border-radius: var(--md-sys-shape-corner-large);
    --card-shadow: var(--md-sys-elevation-level1);
    --glass-blur: 0;
    --glass-bg: var(--md-sys-color-surface);
}

/* Global transitions for Stitch-MD */
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card, .gameresult-box, .topnews-news, .m-card {
    border-radius: var(--border-radius) !important;
    box-shadow: var(--card-shadow) !important;
    background-color: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--md-sys-color-outline-variant);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme Switcher UI (Stitch styled) */
.theme-switcher {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 2000;
    background: var(--md-sys-color-surface-variant);
    padding: 8px;
    border-radius: var(--md-sys-shape-corner-full);
    box-shadow: var(--md-sys-elevation-level2);
    display: flex;
    gap: 8px;
    border: 1px solid var(--md-sys-color-outline);
}

.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--md-sys-shape-corner-full);
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
}

.theme-btn.active {
    box-shadow: 0 0 0 3px var(--md-sys-color-primary);
}

.theme-btn[data-set-theme="dynamic"] { background: var(--md-sys-color-primary); color: white; }
.theme-btn[data-set-theme="glassy"] { background: white; color: var(--md-sys-color-primary); border: 1px solid var(--md-sys-color-outline); }
.theme-btn[data-set-theme="app"] { background: var(--md-sys-color-secondary); color: white; }
