:root {
    --bg-light: #f4f4f4;
    --bg-dark: #1e1e1e;
    --card-light: #ffffff;
    --card-dark: #2c2c2c;
    --text-light: #333;
    --text-dark: #eee;
    --accent: #25d366;
    --hover: #1ebe57;
    --disabled: #bbb;
}

[data-theme="light"] {
    --bg: var(--bg-light);
    --card: var(--card-light);
    --text: var(--text-light);
}

[data-theme="dark"] {
    --bg: var(--bg-dark);
    --card: var(--card-dark);
    --text: var(--text-dark);
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    padding: 40px 20px;
    transition: background 0.3s ease, color 0.3s ease;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--accent);
    font-size: 2rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.tool-card .icon {
    font-size: 40px;
    margin-bottom: 15px;
    text-align: center;
}

.tool-card h2 {
    font-size: 20px;
    margin-bottom: 6px;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    background-color: transparent;
    border: 1px solid;
    margin: 6px auto 10px auto;
    color: var(--text);
    opacity: 0.75;
}

.badge.hot {
    border-color: #ee6c4d;
    color: #ee6c4d;
}

.badge.popular {
    border-color: #ffb703;
    color: #ffb703;
}

.badge.new {
    border-color: #3a86ff;
    color: #3a86ff;
}

.badge.underrated {
    border-color: #8338ec;
    color: #8338ec;
}

.tool-card p {
    font-size: 14px;
    color: #888;
    text-align: center;
    margin-bottom: auto;
}

.tool-card .action {
    margin-top: auto;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.tool-btn {
    display: inline-block;
    padding: 10px 16px;
    background-color: var(--accent);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.tool-btn:hover {
    background-color: var(--hover);
    transform: scale(1.05);
}

.tool-btn.disabled {
    background-color: var(--disabled);
    cursor: not-allowed;
    pointer-events: none;
}
