/* Board Buddy — Hub Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== Themes ===== */

/* 1. Current — light olive */
[data-theme="current"],
:root {
    --accent: #c2c82a;
    --accent-hover: #aab224;
    --bg: #f5f5f0;
    --card-bg: #ffffff;
    --text: #2c2c2c;
    --text-muted: #777;
    --border: #e0e0d8;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --radius: 12px;
    --max-width: 960px;
    --icon-bg: #e8e8e0;
}

/* 2. Deep Indigo — dark, premium */
[data-theme="indigo"] {
    --accent: #6c5ce7;
    --accent-hover: #5a4bd1;
    --bg: #0f0f13;
    --card-bg: #1a1a24;
    --text: #e0e0e0;
    --text-muted: #888;
    --border: #2a2a38;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --radius: 12px;
    --max-width: 960px;
    --icon-bg: #26263a;
}

/* 3. Warm Earth — warm, natural */
[data-theme="earth"] {
    --accent: #d4a373;
    --accent-hover: #c49363;
    --bg: #faf7f2;
    --card-bg: #fefcf9;
    --text: #2c2c2c;
    --text-muted: #888;
    --border: #e8ddd0;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --radius: 12px;
    --max-width: 960px;
    --icon-bg: #efe5d8;
}

/* 4. Slate Blue — clean, minimal */
[data-theme="slate"] {
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --radius: 12px;
    --max-width: 960px;
    --icon-bg: #f0f4f8;
}

/* 5. Forest Green — nature-themed */
[data-theme="forest"] {
    --accent: #2d936c;
    --accent-hover: #237a5a;
    --bg: #f0f7f3;
    --card-bg: #ffffff;
    --text: #1a2e1a;
    --text-muted: #7a9a80;
    --border: #d0e3d6;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --radius: 12px;
    --max-width: 960px;
    --icon-bg: #e0efe5;
}

/* 6. Charcoal Coral — bold, dramatic */
[data-theme="coral"] {
    --accent: #ff6b6b;
    --accent-hover: #e05555;
    --bg: #1a1a1a;
    --card-bg: #262626;
    --text: #e0e0e0;
    --text-muted: #888;
    --border: #333333;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --radius: 12px;
    --max-width: 960px;
    --icon-bg: #333333;
}

html { font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    transition: background 0.25s, color 0.25s;
}

/* Header */
header {
    text-align: center;
    padding: 3rem 1rem 1rem;
}

header h1 {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

header h1 span { color: var(--accent); }

header p {
    color: var(--text-muted);
    margin-top: 0.4rem;
    font-size: 1.05rem;
}

/* Theme picker */
.theme-picker {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.theme-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    padding: 0;
    outline: none;
    background: transparent;
    position: relative;
}

.theme-dot:hover {
    transform: scale(1.15);
}

.theme-dot.active {
    border-color: var(--text);
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text);
}

.theme-dot[data-theme="current"] { background: #c2c82a; }
.theme-dot[data-theme="indigo"]  { background: #6c5ce7; }
.theme-dot[data-theme="earth"]   { background: #d4a373; }
.theme-dot[data-theme="slate"]   { background: #3b82f6; }
.theme-dot[data-theme="forest"]  { background: #2d936c; }
.theme-dot[data-theme="coral"]   { background: #ff6b6b; }

/* Main grid */
main {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
    width: 100%;
}

.apps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* App card */
.app-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s, background 0.25s, border-color 0.25s;
}

a.app-card,
a.app-card:hover,
a.app-card:focus,
a.app-card:active {
    text-decoration: none;
}

.app-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Coming soon badge */
.badge-soon {
    position: absolute;
    top: 12px;
    right: -28px;
    background: #f59e0b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 32px;
    transform: rotate(45deg);
    z-index: 1;
    line-height: 1.3;
}

.app-card.coming-soon {
    cursor: default;
    opacity: 0.85;
}
.app-card.coming-soon:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.app-icon {
    width: 48px;
    height: 48px;
    background: var(--icon-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    transition: background 0.25s;
}

.app-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.app-icon-placeholder {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
}

.app-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.app-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    flex: 1;
}

/* Coming soon placeholder */
.placeholder {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 2px dashed var(--border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
    gap: 0.5rem;
    min-height: 200px;
    transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.placeholder span { font-size: 2rem; }

/* Support section */
.support {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1rem;
    text-align: center;
}

.support h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.support p {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.support .support-alt {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.support-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.support-links a {
    color: var(--accent);
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: background 0.15s, border-color 0.15s;
}

.support-links a:hover {
    background: var(--card-bg);
    border-color: var(--accent);
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    border-top: 1px solid var(--border);
    transition: border-color 0.25s;
}

/* Responsive */
@media (max-width: 640px) {
    header h1 { font-size: 1.8rem; }
    .apps { grid-template-columns: 1fr; }
    .app-card { padding: 1.5rem; }
}