/* ============================================
   COMPETITOR WEAKNESS FINDER CSS
   ============================================ */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
    text-align: left;
}

@media(max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
}

.help-text {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-top: 12px;
    display: block;
    text-align: center;
}

/* Loader */
#loaderView {
    display: none;
    text-align: center;
    padding: 60px 20px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.target-spinner {
    width: 80px;
    height: 80px;
    border: 3px dashed var(--accent);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spinDashed 2s linear infinite;
    position: relative;
}

.target-spinner::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 20px; height: 20px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 20px #ef4444;
    animation: pulseRed 1s ease-in-out infinite alternate;
}

@keyframes spinDashed {
    100% { transform: rotate(360deg); }
}

@keyframes pulseRed {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.2; }
}

.log-box {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 16px;
    max-width: 500px;
    margin: 24px auto 0;
    text-align: left;
    font-family: monospace;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    height: 140px;
    overflow-y: auto;
}

.log-entry { margin-bottom: 8px; animation: slideUp 0.3s; }
.log-entry span { color: var(--accent); }

/* Dashboard Views */
#dashboardView {
    display: none;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    text-align: left;
}

.export-actions {
    display: flex;
    gap: 12px;
}

/* Grid Layout */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
    text-align: left;
}

.dash-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    overflow: hidden;
}

.card-header {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-sub {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 20px;
}

/* Weakness Cards */
.weakness-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.w-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.w-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: #ef4444; /* Red for weakness */
}

.w-num {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 8px;
}

.w-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.w-opp {
    background: rgba(29, 124, 110, 0.1);
    border-left: 3px solid var(--accent);
    padding: 12px 16px;
    margin-bottom: 16px;
}

.w-opp-lbl {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 4px;
}

.w-opp-text {
    font-size: 0.9rem;
    color: #fff;
    line-height: 1.5;
}

.w-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.w-metric-lbl {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.w-metric-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #10b981; /* Green for gain */
}

/* Attack Plan */
.attack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.attack-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 20px;
}

.ab-icon {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #fff;
}

.ab-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.ab-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media(max-width: 768px) {
    .dashboard-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .export-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
}
