/* RESET */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

/* BODY */
body {
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(135deg,#eef2ff,#f5f7fa);
    display:flex;
    flex-direction:column;
    min-height:100vh;
}

.result-box p {
  margin: 6px 0;
}

/* CONTAINER */
.container {
    max-width: 720px;
    width: 92%;
    margin: auto;
    margin-bottom: 30px;
    padding: 20px 0;
    flex:1;
    text-align:center;
}

/* LOGO */
.logo img{
    height:48px;
    margin-bottom:10px;
}

/* INPUT */
input{
    padding:14px 16px;
    width:100%;
    border-radius:14px;
    border:1px solid #e0e0e0;
    font-size:15px;
    background:#fff;

    box-shadow:0 2px 8px rgba(0,0,0,0.04);
    transition:all 0.25s ease;
}

/* HOVER */
input:hover{
    border-color:#005AFF;
    
}

/* FOCUS */
input:focus{
    outline:none;
    border-color:#005AFF;
    box-shadow:0 3px 10px rgba(0,90,255,0.1);
}

/* BUTTON MAIN */
button {
    margin-top: 18px;
    padding: 14px;
    width:100%;
    background: linear-gradient(90deg,#005AFF,#00C3FF);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight:600;
    cursor:pointer;
    transition:0.3s;
}

button:hover{
    transform: translateY(-2px);
    box-shadow:0 10px 25px rgba(0,90,255,0.25);
}

/* CARD */
.card{
    margin-top:20px;
    padding:20px;
    border-radius:20px;
    text-align:left;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(18px);
    box-shadow:0 18px 40px rgba(0,0,0,0.1);
}

/* RESULT */
.result-box{
    display:flex;
    flex-direction:column;
    gap:16px;
    margin-top:16px;
}

h2{
    margin-bottom:8px;
}

/* BOX */
.box{
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(14px);
    padding:18px;
    border-radius:18px;
    box-shadow:0 8px 20px rgba(0,0,0,0.08);
    transition:0.25s;
}

/* SECTION TITLE */
.section-title{
    font-size:16px;
    font-weight:700;
    margin-bottom:12px;
}

/* DETAIL ROW */
.detail-row{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:10px;
    font-size:14px;
}

.detail-row i{
    width:15px;          
    text-align:center; 
    font-size:16px;
    color:#005AFF;
}

.box:hover{
    transform: translateY(-3px);
}

/* FLEX */
.flex{
    display:flex;
    gap:14px;
    align-items:flex-start;
    flex-wrap:wrap;
}

/* IMAGE */
.thumb{
    width:90px;
    height:90px;
    object-fit:cover;
    border-radius:10px;
    flex-shrink:0;

    background:#fff;

    border:1px solid #005AFF;

    box-shadow:0 8px 20px rgba(0,0,0,0.08);
    transition:all 0.25s ease;
}

/* GRID */
.grid2{
    display:grid;
    grid-template-columns: repeat(2,1fr);
    gap:12px;
}

.grid3{
    display:grid;
    grid-template-columns: repeat(3,1fr);
    gap:12px;
}

/* DIVIDER LINE (BOX 2 FIX) */
.grid2 .stat:not(:last-child){
    border-right:1.5px solid rgba(0,0,0,0.08);
}

/* DIVIDER LINE (BOX 3 FIX) */
.grid3 .stat:not(:last-child){
    border-right:1.5px solid rgba(0,0,0,0.08);
}

/* STAT */
.stat{
    background: rgba(255,255,255,0.6);
    padding:14px;
    border-radius:14px;
    text-align:center;
}

/* LABEL */
.label{
    font-size:15px;
    color:#666;
    margin-bottom:8px;
    font-weight:700;
}

/* VALUE */
.stat h2{
    font-size:22px;
    font-weight:700;
    color:#005AFF;
}

/* BIG */
.grid2 .stat h2{
    font-size:26px;
    color:#000;
}

/* =======================
   PROGRESS BAR
======================= */
.progress{
  height:8px;
  background: rgba(0,0,0,0.06);
  border-radius:50px;
  overflow:hidden;
  margin-bottom:12px;
  position:relative;
}

/* BAR */
.bar{
  height:100%;
  display:block;

  /* FORCE width visible */
  width:100%;

  border-radius:50px;

  background: linear-gradient(90deg,#005AFF,#00C3FF);

  transition: width 1.2s ease;

  min-width:2px;
}

/* =======================
   COLORS (SAFE)
======================= */
.bar[style*="width:100"]{
  background: linear-gradient(90deg,#ff3b3b,#ff8a8a);
}

.bar[style*="width:8"],
.bar[style*="width:9"]{
  background: linear-gradient(90deg,#ff9800,#ffcc80);
}

/* =======================
   BUDGET TEXT
======================= */
.budget{
  display:flex;
  justify-content:space-between;
  font-weight:600;
  font-size:14px;
}

/* DATE RANGE SELECT FIX */
.date-filter select{
    margin-top:8px;

    /* FIXED AUTO PADDING */
    padding:0.6em 2.2em 0.6em 0.9em;

    border-radius:10px;
    border:1px solid #e0e0e0;
    font-size:14px;
    background:#fff;
    color:#333;

    box-shadow:0 2px 8px rgba(0,0,0,0.05);
    cursor:pointer;
    transition:all 0.25s ease;

    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;

    background-image:url("data:image/svg+xml;utf8,<svg fill='%23005AFF' height='18' viewBox='0 0 20 20' width='18' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
    
    background-repeat:no-repeat;

    /* AUTO POSITION */
    background-position:right 0.7em center;

    /* AUTO SIZE */
    background-size:1em;
}

/* HOVER */
.date-filter select:hover{
    border-color:#005AFF;
    box-shadow:0 4px 12px rgba(0,90,255,0.12);
}

/* FOCUS */
.date-filter select:focus{
    outline:none;
    border-color:#005AFF;
    box-shadow:0 0 0 3px rgba(0,90,255,0.15);
}

/* REMOVE OLD ARROW */
select::-ms-expand{
    display:none;
}

/* SELECT */
select{
    padding:6px 10px;
    border-radius:8px;
    border:none;
    font-size:13px;
    background: rgba(255,255,255,0.85);
    box-shadow:0 4px 10px rgba(0,0,0,0.05);
    cursor:pointer;
}

/* TEXT */
h3{
    margin-bottom:6px;
    font-size:17px;
    font-weight:700;
}

p{
    font-size:16px;
    font-weight:520;
    color:#444;
}

/* DATE BOX */
.date-box p{
    margin-bottom:10px;
    line-height:1.6;
}

.date-box strong{
    display:inline-block;
}

/* ERROR BOX */
.error-box{
    background: rgba(255,0,0,0.08);
    backdrop-filter: blur(10px);
    color:#c40000;
    padding:12px;
    border-radius:10px;
    text-align:center;
    margin-top:15px;
    margin-bottom:15px;
    font-weight:600;
}

/* TOAST */
.toast{
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #111;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transition: 0.3s;
    z-index: 9999;
}

.toast.show{
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ACTION BUTTONS FIX */
.action-row{
    display:flex;
    gap:8px;
    margin-top:12px;
}

.action-row button{
    flex:1;
    margin-top:10px;
    padding:12px 8px;
    border-radius:10px;
    font-size:15px;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
}

.limit-msg {
    margin-top: 15px;
    text-align: center;
    color: #ef4444;
    font-weight: 600;
    font-size: 14px;
}

/* FOOTER */
.footer{
text-align:center;
padding:20px;
font-size:14px;
color:#666;
background: rgba(255,255,255,0.6);
backdrop-filter: blur(10px);
border-top:1px solid rgba(255,255,255,0.5);
box-shadow: 0 -8px 25px rgba(0,0,0,0.08);
}

.footer a{
color:#005AFF;
font-weight:600;
text-decoration:none;
}

.footer a:hover{
color:#00C3FF;
}

/* MOBILE */
@media(max-width:480px){

    /* layout */
    .flex{
        flex-direction:row;
        align-items:flex-start;
        gap:10px;
    }

    /* thumbnail */
    .thumb{
        width:70px;
        height:70px;
        border-radius:12px;
    }
    
    .thumb{
    object-fit:cover;
    image-rendering: auto;
}

    /* ONLY top stats (Messages, Cost, Spend) */
    .grid3 .label{
        font-size:11px;
        margin-bottom:4px;
    }


    /* content */
    .flex > div{
        flex:1;
    }

    /* TITLE SMALL */
    .flex h3{
        font-size:15px;
        font-weight:700;
        line-height:1.3;
        margin-bottom:4px;
    }

    /* text */
    .flex p{
        font-size:13px;
        font-weight:520;
        margin-bottom:2px;
    }

    /* DATE RANGE INLINE */
.date-filter{
    display:flex;
    align-items:center;
    justify-content:flex-start; /* ðŸ”¥ FIX */
    margin-top:6px;
    gap:4px;
}

    .date-filter span{
        font-size:14px;
        font-weight:500;
        
    }

    .date-filter select{
        font-size:14px;
        padding:5px 8px;
        border-radius:8px;
        max-width:120px;
    }
    
    .date-filter span{
    white-space:nowrap; 
}

.date-filter{
    flex-wrap:nowrap;
}

  .budget span {
    font-size: 11px;
    line-height: 1.4;
    display: block;
  }

    /* GRID */
    .grid3{
        grid-template-columns:1fr 1fr 1fr;
        gap:8px;
    }

    .grid2{
        grid-template-columns:1fr 1fr;
        gap:8px;
    }

    /* stats */
    .stat{
        padding:10px;
    }

    .stat h2{
        font-size:18px;
        margin-bottom:0;
    }

    .grid2 .stat h2{
        font-size:22px;
    }

    .grid3{
        display:grid;
        grid-template-columns:repeat(3, 1fr) !important;
        gap:6px;
    }

    .grid3 .stat{
        min-width:0; /* prevent overflow break */
        padding:10px 6px;
    }

    .grid3 .label{
        font-size:11px;
    }

    .grid3 .stat h2{
        font-size:16px;
    }

}

/* TABLET */
@media(max-width:768px){
    .grid3{
        grid-template-columns:1fr 1fr;
    }
}

/* =======================
   CAMPAIGN DETAILS 2 COLUMN
======================= */

.date-box{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px 30px;
}

/* title full width */
.date-box .section-title{
    grid-column:1 / -1;
}

/* MOBILE → back to 1 column */
@media(max-width:480px){
    .date-box{
        grid-template-columns:1fr;
    }
}

/* =========================================
   KPI BOX - SEPARATE HOVER EFFECT
   ========================================= */
   
.kpi-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    padding:0;
    background:transparent;
    border:0;
    box-shadow:none;
}

@media (max-width: 767px){

    .kpi-grid{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        gap:10px !important;
    }

    .kpi-card{
        min-width:0 !important;
        width:100% !important;
        padding:14px 12px !important;
        min-height:135px !important;
        box-sizing:border-box;
    }

    /* KPI ICON - MOBILE */
.kpi-card > div:first-child{
    width:36px !important;
    height:36px !important;
    min-width:36px !important;
    min-height:36px !important;

    margin-bottom:8px !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;

    border-radius:11px !important;
    box-sizing:border-box !important;
}

/* Icon */
.kpi-card > div:first-child i{
    font-size:16px !important;
    line-height:1 !important;
}

    .kpi-card .kpi-value{
        font-size:20px !important;
        line-height:1.2 !important;
    }

    .kpi-card .kpi-label{
        font-size:13px !important;
        line-height:1.35 !important;
    }

}


/* ================= RESULT METRICS ================= */

.result-metrics{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
    padding:0;
    background:transparent;
    border:0;
    box-shadow:none;
}

.result-metric-card{
    background:#fff;
    border:1px solid #dbe3ef;
    border-radius:10px;
    padding:16px 15px;
    min-height:135px;
    box-sizing:border-box;
}

.result-metric-icon{
    width:46px;
    height:46px;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:11px;
}

.result-metric-icon i{
    font-size:21px;
}

.result-metric-label{
    margin:0 0 5px;
    font-size:13px;
    font-weight:600;
    color:#111827;
    line-height:1.35;
}

.result-metric-value{
    margin:0 0 5px;
    font-size:24px;
    font-weight:700;
    line-height:1.2;
}

.result-metric-description{
    margin:0;
    font-size:11px;
    color:#64748b;
    line-height:1.4;
}


/* ================= MOBILE ================= */

@media (max-width:767px){

    .result-metrics{
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:7px;
    }

    .result-metric-card{
        min-width:0;
        width:100%;
        padding:12px 9px;
        min-height:125px;
        border-radius:9px;
    }

    .result-metric-icon{
        width:36px;
        height:36px;
        border-radius:11px;
        margin-bottom:8px;
    }

    .result-metric-icon i{
        font-size:16px;
    }

    .result-metric-label{
        font-size:10px;
        line-height:1.25;
        margin-bottom:4px;
    }

    .result-metric-value{
        font-size:20px;
        line-height:1.2;
        margin-bottom:4px;
        white-space:nowrap;
    }

    .result-metric-description{
        font-size:9px;
        line-height:1.3;
    }

}

/* =========================================
   SEPARATE HOVER EFFECT
   Each box will hover independently
   ========================================= */

/* Remove any group-level hover effect */
.kpi-grid:hover,
.result-metrics:hover{
    transform:none !important;
    box-shadow:none !important;
}


/* ================= RESULT BOX HOVER ================= */

/* Result */
.result-metric-card:nth-child(1){
    transition:all .25s ease;
}

.result-metric-card:nth-child(1):hover{
    transform:translateY(-4px);
    border-color:#005AFF;
    box-shadow:0 8px 22px rgba(0,90,255,.15);
}


/* Cost Per Result */
.result-metric-card:nth-child(2){
    transition:all .25s ease;
}

.result-metric-card:nth-child(2):hover{
    transform:translateY(-4px);
    border-color:#f59e0b;
    box-shadow:0 8px 22px rgba(245,158,11,.15);
}


/* Spend */
.result-metric-card:nth-child(3){
    transition:all .25s ease;
}

.result-metric-card:nth-child(3):hover{
    transform:translateY(-4px);
    border-color:#16a34a;
    box-shadow:0 8px 22px rgba(22,163,74,.15);
}


/* ================= KPI BOX HOVER ================= */

/* Reach */
.kpi-card:nth-child(1) .kpi-value{
    color:#005AFF !important;
}

.kpi-card:nth-child(1){
    transition:all .25s ease;
}

.kpi-card:nth-child(1):hover{
    transform:translateY(-4px);
    border-color:#16a34a;
    box-shadow:0 8px 22px rgba(22,163,74,.15);
}


/* Impressions */
.kpi-card:nth-child(2) .kpi-value{
    color:#6d35e8 !important;
}

.kpi-card:nth-child(2){
    transition:all .25s ease;
}

.kpi-card:nth-child(2):hover{
    transform:translateY(-4px);
    border-color:#6d35e8;
    box-shadow:0 8px 22px rgba(109,53,232,.15);
}


/* CTR */
.kpi-card:nth-child(3) .kpi-value{
    color:#0faaa5 !important;
}

.kpi-card:nth-child(3){
    transition:all .25s ease;
}

.kpi-card:nth-child(3):hover{
    transform:translateY(-4px);
    border-color:#0faaa5;
    box-shadow:0 8px 22px rgba(15,170,165,.15);
}


/* ROAS */
.kpi-card:nth-child(4) .kpi-value{
    color:#16a34a !important;
}

.kpi-card:nth-child(4){
    transition:all .25s ease;
}

.kpi-card:nth-child(4):hover{
    transform:translateY(-4px);
    border-color:#16a34a;
    box-shadow:0 8px 22px rgba(22,163,74,.15);
}


/* ================= ICON HOVER ================= */

.result-metric-icon,
.kpi-card > div:first-child{
    transition:transform .25s ease;
}

.result-metric-card:hover .result-metric-icon,
.kpi-card:hover > div:first-child{
    transform:scale(1.06);
}


/* ================= MOBILE ================= */

@media (max-width:767px){

    .result-metric-card:nth-child(1):hover,
    .result-metric-card:nth-child(2):hover,
    .result-metric-card:nth-child(3):hover,
    .kpi-card:nth-child(1):hover,
    .kpi-card:nth-child(2):hover,
    .kpi-card:nth-child(3):hover,
    .kpi-card:nth-child(4):hover{
        transform:translateY(-3px);
    }

}

/* =========================================
   BUDGET USED
   ========================================= */

.budget-used-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-top:14px;
    padding-top:12px;
    border-top:1px solid #eef2f7;
}

.budget-used-left{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:13px;
    color:#111827;
}

.budget-used-left strong{
    font-weight:600;
}

.budget-used-value{
    font-weight:700;
    color:#111827;
}

.budget-used-status{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:4px 10px;
    border-radius:20px;
    font-size:11px;
    font-weight:700;
    white-space:nowrap;
}


/* ================= MOBILE ================= */

@media (max-width:767px){

    .budget-used-row{
        margin-top:12px;
        padding-top:10px;
        gap:8px;
    }

    .budget-used-left{
        font-size:12px;
    }

    .budget-used-status{
        padding:4px 8px;
        font-size:10px;
    }

}

.error-content p{
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 500;
}

.error-box{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    gap:8px;

    width:100%;
    max-width:360px;
    margin:0 auto;
    padding:16px 20px;

    border-radius:14px;
    box-sizing:border-box;
}

.error-icon{
    width:34px;
    height:34px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:50%;
    font-size:17px;
}

.error-content h4{
    margin:0;
    font-size:20px;
    line-height:1.25;
    font-weight:700;
}

.error-content p{
    margin:0;
    font-size:15px;
    line-height:1.4;
    font-weight:500;
}


/* ================= ERROR / DANGER ================= */

.error-danger{
    background:#fff1f1;
    border:1px solid #fecaca;
}

.error-danger .error-icon{
    background:#fee2e2;
    color:#dc2626;
}

.error-danger .error-content h4{
    color:#b91c1c;
}

.error-danger .error-content p{
    color:#6b4a4a;
}


/* ================= WARNING ================= */

.warning-box{
    background:#fff7ed;
    border:1px solid #fed7aa;
}

.warning-box .error-icon{
    background:#ffedd5;
    color:#ea580c;
}

.warning-box .error-content h4{
    color:#b45309;
}

.warning-box .error-content p{
    color:#57534e;
}


/* ================= INFO ================= */

.error-info{
    background:#eff6ff;
    border:1px solid #bfdbfe;
}

.error-info .error-icon{
    background:#dbeafe;
    color:#2563eb;
}

.error-info .error-content h4{
    color:#1d4ed8;
}

.error-info .error-content p{
    color:#475569;
}

/* =========================================
   CAMPAIGN INSIGHT LOADING
========================================= */

.insight-loading {
    width: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px 20px;
    box-sizing: border-box;
}

.insight-loading-box {
    width: 100%;
    max-width: 360px;
    text-align: center;
    padding: 28px 22px;
    border-radius: 18px;
    background: linear-gradient(
        145deg,
        #ffffff 0%,
        #f8fbff 100%
    );
    border: 1px solid rgba(0, 90, 255, 0.10);
    box-shadow:
        0 12px 35px rgba(0, 42, 120, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.03);
}

/* Animated icon */
.loading-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 17px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(0, 90, 255, 0.10);
}

.loading-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #005AFF;
    border-right-color: #00C3FF;
    animation: insightSpin 1s linear infinite;
}

.loading-icon i {
    font-size: 22px;
    color: #005AFF;
    animation: insightPulse 1.4s ease-in-out infinite;
}

/* Loading title */
.loading-title {
    margin: 0;
    color: #06062B;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 800;
}

/* Loading subtitle */
.loading-subtitle {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

/* Animated dots */
.loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 3px;
}

.loading-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #005AFF;
    display: inline-block;
    animation: loadingDot 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.18s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.36s;
}

/* Bottom progress line */
.loading-progress {
    width: 100%;
    max-width: 210px;
    height: 4px;
    margin: 19px auto 0;
    overflow: hidden;
    border-radius: 50px;
    background: #eaf1ff;
}

.loading-progress span {
    display: block;
    width: 45%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #005AFF,
        #00C3FF
    );
    animation: loadingProgress 1.5s ease-in-out infinite;
}

/* Animations */
@keyframes insightSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes insightPulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.82);
        opacity: 0.65;
    }
}

@keyframes loadingDot {
    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.35;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@keyframes loadingProgress {
    0% {
        transform: translateX(-120%);
    }

    50% {
        transform: translateX(120%);
    }

    100% {
        transform: translateX(250%);
    }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .insight-loading {
        min-height: 200px;
        padding: 25px 12px;
    }

    .insight-loading-box {
        max-width: 100%;
        padding: 25px 18px;
        border-radius: 16px;
    }

    .loading-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 15px;
    }

    .loading-icon i {
        font-size: 20px;
    }

    .loading-title {
        font-size: 16px;
    }

    .loading-subtitle {
        font-size: 12px;
    }

    .loading-progress {
        max-width: 180px;
    }
}

/* ================= ADS PLATFORM SELECTOR ================= */
.platform-selector{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin:0 0 14px;
}
.platform-option{
  border:1px solid #e5eaf2;
  background:#fff;
  color:#334155;
  border-radius:12px;
  padding:13px 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  font:600 14px Inter,Arial,sans-serif;
  cursor:pointer;
  transition:.2s ease;
}
.platform-option:hover{border-color:#b9cbea;transform:translateY(-1px)}
.platform-option.active{border-color:#005AFF;background:#f3f7ff;color:#005AFF;box-shadow:0 5px 18px rgba(0,90,255,.08)}
.platform-option[data-platform="google"].active{border-color:#ea4335;color:#ea4335;background:#fff7f7}
.platform-option[data-platform="tiktok"].active{border-color:#111;color:#111;background:#f8fafc}
.selected-platform-label{font-size:12px;font-weight:700;color:#64748b;margin:0 0 8px 2px}
.ads-platform-result .detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 20px}
.ads-platform-result .detail-box h3,.ads-platform-result .recommendation-box h3{margin-top:0}
@media(max-width:650px){
  .platform-selector{grid-template-columns:1fr}
  .platform-option{justify-content:flex-start}
  .ads-platform-result .detail-grid{grid-template-columns:1fr}
}


/* =========================================================
   INSIGHTER PLATFORM SELECTOR — FINAL RESPONSIVE OVERRIDES
   ========================================================= */
.platform-selector{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    margin:0 0 16px;
}
.platform-option{
    width:100%;
    min-width:0;
    margin:0;
    min-height:48px;
    padding:9px 10px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:1px solid #dfe6ef;
    border-radius:12px;
    background:#fff;
    color:#475569;
    box-shadow:none;
    font-size:12px;
    font-weight:700;
    transition:.2s ease;
}
.platform-option i{font-size:15px;line-height:1}
.platform-option:hover{transform:translateY(-1px);box-shadow:0 7px 16px rgba(15,23,42,.07)}
.platform-option[data-platform="facebook"].active{border-color:#1877F2;color:#1877F2;background:#f3f8ff;box-shadow:0 0 0 2px rgba(24,119,242,.08)}
.platform-option[data-platform="google"].active{border-color:#4285F4;color:#4285F4;background:#f4f8ff;box-shadow:0 0 0 2px rgba(66,133,244,.08)}
.platform-option[data-platform="tiktok"].active{border-color:#111827;color:#111827;background:#f7f8fa;box-shadow:0 0 0 2px rgba(17,24,39,.07)}
.selected-platform-label{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#64748b;margin:0 0 8px}

@media(max-width:650px){
    .platform-selector{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
    .platform-option{min-height:44px;padding:7px 4px;gap:5px;border-radius:10px;font-size:10px;white-space:nowrap}
    .platform-option i{font-size:13px}
    .selected-platform-label{font-size:10px}
}
@media(max-width:360px){
    .platform-option{font-size:9px;gap:3px;padding-left:2px;padding-right:2px}
    .platform-option i{font-size:12px}
}
