/* ============================================
   IGTool.in - Premium SaaS Brighthub Redesign
   ============================================ */

/* CSS Variables */
:root {
    /* Brighthub-inspired Palette */
    --primary: #FF5C00;
    --primary-light: #FF8533;
    --primary-dark: #E65300;
    --secondary: #FFF6F0;

    --text-main: #1A1A1A;
    --text-muted: #666666;
    --bg-page: #FAFAFA;
    --bg-card: #FFFFFF;

    --gradient-primary: linear-gradient(135deg, #FF5C00, #FF8E53);
    --gradient-hero: linear-gradient(135deg, #FFF9F5 0%, #FFEFE5 50%, #FFF5F0 100%);

    /* Super Soft "Floating" Shadows */
    --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.04);
    --shadow-float-hover: 0 24px 48px rgba(0, 0, 0, 0.08);
    --shadow-btn: 0 8px 16px rgba(255, 92, 0, 0.2);
    --shadow-btn-hover: 0 12px 24px rgba(255, 92, 0, 0.3);

    /* Structural */
    --radius-huge: 2rem;
    --radius-lg: 1.5rem;
    --radius-md: 1rem;
    --radius-pill: 100px;

    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] {
    --text-main: #FFFFFF;
    --text-muted: #A0A0A0;
    --bg-page: #0A0A0A;
    --bg-card: #141414;
    --secondary: #1A120D;

    --gradient-hero: linear-gradient(135deg, #0A0A0A 0%, #170A03 50%, #0D0500 100%);

    --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.4);
    --shadow-float-hover: 0 24px 48px rgba(0, 0, 0, 0.6);

    --glass-bg: rgba(20, 20, 20, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-page);
    color: var(--text-main);
}

body {
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

::selection {
    background: var(--primary);
    color: white;
}

/* ============================================
   Typography (Brighthub Style)
   ============================================ */
.heading-massive {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.heading-section {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.heading-card {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text-main);
}

.text-body-large {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    line-height: 1.6;
    color: var(--text-muted);
}

.text-highlight {
    color: var(--primary);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeLift {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatSoft {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes heroShapes {
    0% {
        transform: scale(1) translate(0, 0);
    }

    33% {
        transform: scale(1.05) translate(20px, -20px);
    }

    66% {
        transform: scale(0.95) translate(-20px, 20px);
    }

    100% {
        transform: scale(1) translate(0, 0);
    }
}

.animate-fade-lift {
    animation: fadeLift 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

/* ============================================
   Glass Header
   ============================================ */
.glass-header {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all 0.3s ease;
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--text-main);
    color: var(--bg-card);
    padding: 0.875rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid transparent;
}

[data-theme="dark"] .btn-primary {
    background: var(--text-main);
    color: var(--bg-page);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    background: var(--primary);
    color: white;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--bg-card);
    color: var(--text-main);
    padding: 0.875rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .btn-secondary {
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
    border-color: var(--primary);
}

.btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 1.0625rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-btn);
    border: none;
}

.btn-accent:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-btn-hover);
}

.btn-copy {
    background: var(--secondary);
    color: var(--primary);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.8125rem;
    transition: all 0.2s;
    border: 1px solid rgba(255, 92, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-copy:hover {
    background: var(--primary);
    color: white;
}

/* ============================================
   Hero Section (Brighthub Style)
   ============================================ */
.hero-wrapper {
    position: relative;
    background: var(--gradient-hero);
    overflow: hidden;
    padding-top: 6rem;
    padding-bottom: 8rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .hero-wrapper {
    border-bottom-color: rgba(255, 255, 255, 0.03);
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    opacity: 0.6;
    animation: heroShapes 15s ease-in-out infinite;
}

.hero-shape-1 {
    width: 600px;
    height: 600px;
    background: rgba(255, 92, 0, 0.15);
    top: -200px;
    right: -100px;
}

.hero-shape-2 {
    width: 500px;
    height: 500px;
    background: rgba(255, 179, 128, 0.15);
    bottom: -150px;
    left: -100px;
    animation-delay: -5s;
}

.hero-content-z {
    position: relative;
    z-index: 10;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    margin-bottom: 2rem;
}

[data-theme="dark"] .hero-badge {
    border-color: rgba(255, 255, 255, 0.06);
}

.hero-badge i {
    color: var(--primary);
}

/* ============================================
   Floating Cards (Brighthub Style)
   ============================================ */
.floating-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-huge);
    padding: 2.5rem;
    box-shadow: var(--shadow-float);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .floating-card {
    border-color: rgba(255, 255, 255, 0.05);
}

.floating-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-float-hover);
    border-color: rgba(255, 92, 0, 0.1);
}

.floating-card-icon {
    width: 4rem;
    height: 4rem;
    border-radius: var(--radius-lg);
    background: var(--secondary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.floating-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.floating-card-desc {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.floating-card-link {
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.floating-card:hover .floating-card-link {
    gap: 0.75rem;
}

/* ============================================
   Tool Interfaces
   ============================================ */
.tool-input {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: var(--bg-page);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.3s;
    font-family: inherit;
}

[data-theme="dark"] .tool-input {
    border-color: rgba(255, 255, 255, 0.1);
}

.tool-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(255, 92, 0, 0.1);
}

.tool-input::placeholder {
    color: #9CA3AF;
}

.result-card {
    background: var(--bg-page);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

@media (min-width: 640px) {
    .result-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

[data-theme="dark"] .result-card {
    border-color: rgba(255, 255, 255, 0.05);
}

/* ============================================
   FAQ Accordion (Modernized)
   ============================================ */
.faq-container {
    max-width: 48rem;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

[data-theme="dark"] .faq-item {
    border-color: rgba(255, 255, 255, 0.06);
}

.faq-item.active {
    border-color: rgba(255, 92, 0, 0.2);
    box-shadow: var(--shadow-float);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    cursor: pointer;
    user-select: none;
    position: relative;
    z-index: 10;
}

@media (min-width: 640px) {
    .faq-question {
        padding: 2rem;
    }
}

.faq-question span {
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    padding-right: 2rem;
    transition: color 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .faq-question span {
    color: white;
}

.faq-icon {
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    background: var(--primary);
    color: white;
}

.faq-answer {
    padding: 0 1.75rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, padding-bottom 0.4s ease-out, visibility 0.4s ease-out;
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.8;
}

.faq-answer p {
    margin-bottom: 0;
}

.faq-item.active .faq-answer {
    padding-bottom: 1.75rem;
    opacity: 1;
    visibility: visible;
}



/* ============================================
   Spacing & Utility Overrides
   ============================================ */
.section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

.seo-content h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.seo-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.seo-content p {
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.seo-content ul,
.seo-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.8;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

.seo-content li::marker {
    color: var(--primary);
    font-weight: bold;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 92, 0, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin-slow 0.8s linear infinite;
}

/* Tailwind Overrides to force consistency */
.max-w-7xl {
    max-width: 80rem !important;
}

.bg-white {
    background-color: var(--bg-card) !important;
}

.text-gray-900 {
    color: var(--text-main) !important;
}

.text-gray-500 {
    color: var(--text-muted) !important;
}

/* Toast */
.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-info {
    border-left: 4px solid var(--primary);
}

/* ============================================
   Admin Layout Structure
   ============================================ */
body.admin-body {
    background-color: #f8fafc;
    /* Lighter gray background */
}

[data-theme="dark"] body.admin-body {
    background-color: var(--bg-page);
}

.admin-sidebar {
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--bg-card);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 40;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

[data-theme="dark"] .admin-sidebar {
    border-right-color: rgba(255, 255, 255, 0.05);
}

/* Sidebar behavior for mobile */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
    }
}

.admin-content {
    margin-left: 250px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

@media (max-width: 1024px) {
    .admin-content {
        margin-left: 0;
    }
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--text-main);
}

[data-theme="dark"] .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.nav-link.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.nav-link.active i {
    color: white !important;
}

.nav-link i {
    width: 1.25rem;
    text-align: center;
    color: inherit;
    opacity: 0.7;
    transition: color 0.2s;
}

.nav-link:hover i {
    color: var(--primary);
    opacity: 1;
}

[data-theme="dark"] .nav-link:hover i {
    color: var(--primary-light);
}

.nav-link.active i {
    opacity: 1;
}