/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Roboto', 'Segoe UI', sans-serif; outline: none; }
body { background: #fff; color: #333; }

:root {
    --primary: #5e17eb; /* Keyword Tool Purple */
    --primary-hover: #4a11ba;
    --border-color: #ddd;
    --text-color: #333;
    --bg-light: #f8f9fa;
}

/* HEADER STYLE */
.main-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    position: sticky; top: 0; z-index: 1000;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-left { display: flex; align-items: center; gap: 30px; }
.logo-area { text-decoration: none; display: flex; align-items: center; gap: 5px; font-size: 20px; font-weight: 700; color: #333; }
.logo-icon { color: var(--primary); font-size: 24px; font-weight: bold; }
.logo-text { color: #333; }

.desktop-nav { display: flex; gap: 20px; }
.desktop-nav a { text-decoration: none; color: #555; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 5px; }
.desktop-nav a:hover { color: var(--primary); }
.desktop-nav i { font-size: 10px; color: #999; }

.header-right { display: flex; align-items: center; gap: 20px; }
.nav-link { text-decoration: none; color: #555; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.cart-count { font-size: 12px; }
.btn-header-login {
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex; align-items: center; gap: 8px;
    transition: 0.3s;
}
.btn-header-login:hover { background: var(--primary-hover); }

/* MAIN CONTAINER */
.container { max-width: 1100px; margin: 40px auto; padding: 0 15px; }
.headline { text-align: center; font-size: 32px; font-weight: 400; margin-bottom: 40px; color: #222; }

/* COMPACT TABS STYLE */
.platform-tabs-wrapper {
    margin-bottom: 0;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}
.platform-tabs {
    display: flex;
    gap: 0; /* No huge gap */
    overflow-x: auto;
    padding: 0 10px;
    -webkit-overflow-scrolling: touch;
}
/* Hide scrollbar */
.platform-tabs::-webkit-scrollbar { display: none; }

.tab {
    padding: 10px 15px;
    cursor: pointer;
    color: #555;
    font-weight: 500;
    font-size: 13px;
    display: flex; 
    align-items: center; 
    gap: 6px;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: 0.2s;
    opacity: 0.9;
}
.tab:hover { background-color: #f8f9fa; color: #000; }
.tab.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    background: transparent;
    font-weight: 700;
    opacity: 1;
}

/* SEARCH BOX */
.search-box-wrapper {
    display: flex;
    background: #fff;
    border: 1px solid #aaa;
    border-radius: 30px;
    margin-top: 20px;
    height: 55px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.sb-part { border-right: 1px solid #eee; display: flex; align-items: center; }
.sb-type { width: 90px; }
.sb-input { flex: 1; }
.sb-country { width: 260px; }
.sb-lang { width: 120px; }

.sb-part select, .sb-part input {
    width: 100%; height: 100%; border: none; background: transparent; padding: 0 15px; font-size: 14px; color: #333; cursor: pointer;
}
.sb-part input { cursor: text; font-size: 16px; }

.sb-btn {
    width: 70px; background: var(--primary); color: white; border: none; cursor: pointer; font-size: 18px; display: flex; justify-content: center; align-items: center; transition: 0.3s;
}
.sb-btn:hover { background: var(--primary-hover); }

/* PROGRESS BAR */
.progress-container { margin: 20px 0; text-align: center; }
.progress-bar { height: 4px; background: #eee; border-radius: 2px; overflow: hidden; max-width: 600px; margin: 10px auto; }
.progress-fill { height: 100%; background: var(--primary); width: 0%; transition: width 0.3s; }

/* RESULTS TABLE */
.results-container { margin-top: 30px; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.btn-export { background: #28a745; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; transition: 0.3s; }
.btn-export:hover { background: #218838; }

.table-wrapper { overflow-x: auto; border: 1px solid #eee; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th { background: #f9f9f9; padding: 15px; text-align: left; font-size: 13px; font-weight: 700; color: #555; border-bottom: 1px solid #eee; }
td { padding: 12px 15px; border-bottom: 1px solid #eee; font-size: 14px; color: #333; }

/* Sortable Header Styling */
th.sortable { cursor: pointer; transition: background 0.2s; user-select: none; }
th.sortable:hover { background-color: #eaeaea; color: var(--primary); }
th i { font-size: 12px; margin-left: 5px; color: #999; }

/* Trend Graph */
.trend-bar { display: flex; gap: 2px; align-items: flex-end; height: 20px; }
.bar { width: 4px; background: #e0e0e0; }
.bar.active { background: var(--primary); }

/* WRITER SECTION */
.writer-container { margin-top: 40px; border: 1px solid #eee; padding: 20px; border-radius: 8px; background: #fff; }
.writer-header { display: flex; justify-content: space-between; margin-bottom: 15px; }
#articleEditor { width: 100%; height: 200px; padding: 15px; border: 1px solid #ddd; border-radius: 4px; resize: vertical; }
.btn-generate { background: var(--primary); color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; }

/* TRUSTED BY SECTION */
.trusted-section { margin-top: 80px; text-align: center; }
.trusted-title { font-size: 20px; color: #333; margin-bottom: 30px; }
.trusted-grid { display: flex; justify-content: center; flex-wrap: wrap; gap: 30px 50px; align-items: center; }
.brand { font-size: 22px; color: #555; display: flex; align-items: center; gap: 8px; opacity: 0.9; filter: grayscale(10%); transition: 0.3s; }
.brand:hover { filter: grayscale(0%); opacity: 1; }

/* MOBILE RESPONSIVE */
@media (max-width: 900px) {
    .desktop-nav, .header-right a:not(.btn-header-login) { display: none; }
    .header-container { justify-content: space-between; }
    .sb-country, .sb-lang, .sb-type { display: none; }
    .sb-part { border: none; }
    .search-box-wrapper { border-radius: 4px; flex-direction: column; height: auto; border: none; box-shadow: none; }
    .sb-input { border: 1px solid #ddd; margin-bottom: 10px; border-radius: 4px; height: 50px; width: 100%; }
    .sb-btn { width: 100%; border-radius: 4px; height: 45px; }
    .trusted-grid { gap: 20px; }
    .brand { font-size: 18px; }
}

.hidden { display: none; }