/* =============================================
   Instagram Engagement Calculator — Stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&display=swap');

.igec-wrapper {
    font-family: 'DM Sans', sans-serif;
    max-width: 580px;
    margin: 2rem auto;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 2px 24px rgba(0,0,0,0.06);
}

/* Header */
.igec-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.igec-logo-icon {
    flex-shrink: 0;
}

.igec-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111;
    margin: 0;
    line-height: 1.2;
}

/* Mode Toggle */
.igec-mode-toggle {
    display: flex;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1.75rem;
    gap: 4px;
}

.igec-mode-btn {
    flex: 1;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 9px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: #888;
    transition: all 0.2s ease;
}

.igec-mode-btn.igec-active {
    background: #ffffff;
    color: #111;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}

/* Hint text */
.igec-hint-text {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Fields */
.igec-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.igec-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.igec-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: #444;
    letter-spacing: 0.01em;
}

.igec-hint {
    font-weight: 400;
    color: #aaa;
    font-size: 0.78rem;
}

.igec-input {
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: #111;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
    -moz-appearance: textfield;
}

.igec-input::-webkit-outer-spin-button,
.igec-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.igec-input:focus {
    border-color: #E1306C;
    background: #fff;
}

.igec-input::placeholder {
    color: #c8c8c8;
}

/* Calculate Button */
.igec-calc-btn {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, #F56040 0%, #E1306C 50%, #833AB4 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: opacity 0.2s, transform 0.15s;
}

.igec-calc-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.igec-calc-btn:active {
    transform: translateY(0);
    opacity: 1;
}

/* Results */
.igec-results {
    margin-top: 1.75rem;
    animation: igec-fadein 0.35s ease;
}

@keyframes igec-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.igec-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.igec-result-card {
    background: #f8f8f8;
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.igec-result-main {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #fff0f4, #f5eeff);
    border: 1.5px solid #f3c5d4;
}

.igec-result-label {
    font-size: 0.78rem;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.igec-result-value {
    font-size: 2.4rem;
    font-weight: 600;
    background: linear-gradient(135deg, #F56040, #E1306C, #833AB4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.igec-result-value.igec-secondary {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #555, #888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.igec-result-badge {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    background: #eee;
    color: #666;
    letter-spacing: 0.03em;
}

.igec-result-badge.igec-badge-poor     { background: #ffe0e0; color: #c0392b; }
.igec-result-badge.igec-badge-average  { background: #fff3d4; color: #c07a00; }
.igec-result-badge.igec-badge-good     { background: #d6f5e3; color: #1a7a40; }
.igec-result-badge.igec-badge-excellent{ background: #e0d6ff; color: #6C3FB5; }

/* Benchmarks */
.igec-benchmark {
    background: #f8f8f8;
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.igec-benchmark-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.9rem;
}

.igec-benchmark-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.igec-bench-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.igec-bench-label {
    font-size: 0.82rem;
    color: #666;
    width: 58px;
    flex-shrink: 0;
}

.igec-bench-bar {
    flex: 1;
    height: 8px;
    background: #ebebeb;
    border-radius: 10px;
    overflow: hidden;
}

.igec-bench-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
}

.igec-bench-poor     { background: #e74c3c; }
.igec-bench-avg      { background: #f39c12; }
.igec-bench-good     { background: #27ae60; }
.igec-bench-excellent{ background: linear-gradient(90deg, #833AB4, #E1306C); }

.igec-bench-range {
    font-size: 0.78rem;
    color: #999;
    width: 52px;
    text-align: right;
    flex-shrink: 0;
}

/* Reset */
.igec-reset-btn {
    width: 100%;
    padding: 0.7rem;
    background: transparent;
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #999;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.igec-reset-btn:hover {
    border-color: #E1306C;
    color: #E1306C;
}

/* Utility */
.igec-hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 480px) {
    .igec-wrapper {
        padding: 1.25rem;
        border-radius: 16px;
        margin: 1rem;
    }

    .igec-fields {
        grid-template-columns: 1fr;
    }

    .igec-results-grid {
        grid-template-columns: 1fr 1fr;
    }

    .igec-result-main {
        grid-column: 1 / -1;
    }

    .igec-result-value {
        font-size: 2rem;
    }
}
