html {
    scroll-behavior: smooth;
}

:root {
    --bg-body: #fdfcff;
    --bg-surface: #ffffff;
    --bg-surface-2: #eff0ff;
    
    --primary: #6d5dfc;
    --on-primary: #ffffff;
    
    --text-main: #1a1c1e;
    --text-muted: #5e6469;
    
    --success: #2ed573;
    --warning: #ffa502;
    --danger: #ff4757;

    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px rgba(109, 93, 252, 0.15); 
    
    --radius-card: 28px;
    --radius-btn: 50px;
}

body.dark-mode {
    --bg-body: #121212;
    --bg-surface: #1e1e1e;
    --bg-surface-2: #2d2d2d;
    
    --primary: #8c7aff;
    --on-primary: #121212;
    
    --text-main: #e2e2e6;
    --text-muted: #a0a5a8;

    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; transition: background-color 0.3s, color 0.3s, transform 0.2s, box-shadow 0.3s; }

body { 
    background-color: var(--bg-body); 
    font-family: 'Poppins', sans-serif; 
    color: var(--text-main); 
    margin: 0; 
    line-height: 1.6; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; }
ul { list-style: none; padding: 0; }

.card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-card);
    padding: 24px; 
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(128, 128, 128, 0.05);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.card h2, .card h3 {
    margin-top: 10px;
    margin-bottom: 6px;
}

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius-btn);
    font-weight: 600; font-size: 0.9rem;
    border: none; cursor: pointer; transition: all 0.2s ease;
    white-space: nowrap;
}

.btn.primary {
    background-color: var(--primary); color: var(--on-primary);
    box-shadow: 0 4px 10px rgba(109, 93, 252, 0.3);
}
.btn.primary:hover { background-color: #5a4bcf; box-shadow: 0 6px 15px rgba(109, 93, 252, 0.5); }

.btn.secondary { 
    background-color: var(--bg-surface-2); 
    color: var(--primary); 
}
.btn.secondary:hover { background-color: #e2e4fa; }

body.dark-mode .btn.secondary { color: var(--text-main); }
body.dark-mode .btn.secondary:hover { background-color: #3d3d3d; color: var(--primary); }

.icon-btn {
    width: 45px; height: 45px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background-color: var(--bg-surface-2); 
    color: var(--primary);
    border: none; cursor: pointer; font-size: 1.1rem; flex-shrink: 0;
}
.icon-btn:hover { background-color: var(--primary); color: var(--on-primary); transform: rotate(15deg); }

body.dark-mode .icon-btn { color: var(--text-main); }
body.dark-mode .icon-btn:hover { color: var(--on-primary); }

.back-to-top {
    position: fixed;
    bottom: 20px; right: 20px;
    background-color: var(--primary); color: var(--on-primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 100;
    opacity: 0.8;
}
.back-to-top:hover { opacity: 1; transform: translateY(-5px); }

nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; gap: 10px; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.logo { font-weight: 800; font-size: 1.5rem; color: var(--text-main); letter-spacing: -0.5px; }

.hero { text-align: center; padding: 80px 0; }
.hero h1 { font-size: 3rem; margin-bottom: 15px; color: var(--text-main); line-height: 1.2; font-weight: 700; }
.hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 30px auto; }

.addon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-bottom: 60px; }
.featured-wrapper { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.featured-img { flex: 1; min-width: 300px; height: 320px; }
.featured-content { flex: 1; min-width: 300px; }

.img-placeholder {
    width: 100%; height: 180px;
    background-color: var(--bg-surface-2);
    border-radius: 20px; 
    margin-bottom: 16px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-weight: 500;
}
.img-placeholder img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }

.card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-size: 0.85rem; color: var(--text-muted); }
.badge { 
    display: inline-block; padding: 6px 16px; border-radius: 50px; 
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 10px; margin-right: 5px; color: #fff;
}
.badge.stable { background-color: var(--success); }
.badge.beta { background-color: var(--warning); color: #2d2d2d; }
.badge.script { background-color: var(--primary); }

.card-actions { 
    display: flex; 
    gap: 12px; 
    margin-top: 20px; 
}
.card-actions .btn { flex: 1; }

.section-title { text-align: center; margin-bottom: 50px; margin-top: 40px; font-weight: 700; }
.version-item { margin-bottom: 20px; scroll-margin-top: 100px; }
.version-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--bg-surface-2); padding-bottom: 10px; margin-bottom: 15px; }
.v-num { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.tag { padding: 4px 10px; border-radius: 6px; font-size: 0.7rem; font-weight: bold; margin-right: 10px; color: white; }
.tag.new { background: var(--success); }
.tag.fix { background: var(--danger); }
.tag.tweak { background: var(--warning); color: #333; }

footer { text-align: center; padding: 50px 20px; color: var(--text-muted); font-size: 0.9rem; margin-top: auto; border-top: 1px solid var(--bg-surface-2); }
.social-links a { display: inline-block; width: 40px; height: 40px; line-height: 40px; border-radius: 50%; background-color: var(--bg-surface-2); color: var(--primary); margin: 0 5px; transition: 0.2s; }
.social-links a:hover { background-color: var(--primary); color: white; transform: translateY(-3px); }

@media (max-width: 600px) {
    .container { 
        padding: 0 20px;
    }
    
    nav { gap: 10px; }
    .logo { font-size: 1.2rem; }
    .nav-right .btn { padding: 8px 14px; font-size: 0.75rem; }
    .icon-btn { width: 38px; height: 38px; }

    .hero h1 { font-size: 2.2rem; }
    
    .card { 
        padding: 20px; 
        border-radius: 24px;
    }
    
    .card-actions { 
        flex-direction: row; 
        margin-top: 16px; 
    }
    .card-actions .btn { padding: 10px 10px; font-size: 0.8rem; }
}
