/* ============================================
   SCHEMA MARKUP GENERATOR - BACKLINKGEN
   ============================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --gradient: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-soft: linear-gradient(135deg, #e0e7ff 0%, #fce7f3 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    --shadow-primary: 0 10px 30px rgba(99, 102, 241, 0.3);
    --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
}

/* Brand Colors */
.brand-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.brand-dark {
    color: var(--dark);
    font-weight: 800;
}

/* ============================================
   BOUNCE ANIMATIONS
   ============================================ */
@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes bounceInUp {
    0% { transform: translateY(100px); opacity: 0; }
    60% { transform: translateY(-20px); }
    80% { transform: translateY(10px); }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.bounce-in {
    animation: bounceIn 0.8s var(--bounce) both;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    padding: 80px 0 60px;
    background: linear-gradient(180deg, #ffffff 0%, #f0f4ff 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    animation-delay: 0.1s;
}

.hero-badge i {
    color: var(--warning);
    animation: wiggle 2s ease-in-out infinite;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    animation-delay: 0.2s;
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.text-gradient::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--gradient);
    opacity: 0.2;
    border-radius: 4px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto 32px;
    line-height: 1.6;
    animation-delay: 0.3s;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    animation-delay: 0.4s;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    transition: all 0.3s var(--bounce);
}

.stat-pill:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.stat-pill i {
    color: var(--success);
}

/* ============================================
   TOOL SECTION
   ============================================ */
.tool-section {
    padding: 40px 0 80px;
    position: relative;
}

.tool-card, .output-card {
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.4s var(--bounce);
}

.tool-card:hover, .output-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.sticky-top-output {
    position: sticky;
    top: 100px;
}

.card-header-custom {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
}

.card-header-custom h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.icon-bubble {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-primary);
    transition: transform 0.3s var(--bounce);
}

.icon-bubble:hover {
    transform: rotate(10deg) scale(1.1);
}

.icon-bubble-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

/* ============================================
   SCHEMA TYPE SELECTOR
   ============================================ */
.schema-type-selector {
    padding: 28px;
    border-bottom: 1px solid var(--border);
}

.schema-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.schema-type-btn {
    padding: 16px 12px;
    background: var(--light);
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.3s var(--bounce);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.schema-type-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    transition: left 0.4s var(--bounce);
    z-index: 0;
    opacity: 0.9;
}

.schema-type-btn i, .schema-type-btn span {
    position: relative;
    z-index: 1;
    transition: color 0.3s;
}

.schema-type-btn i {
    font-size: 22px;
}

.schema-type-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.schema-type-btn:hover::before {
    left: 0;
}

.schema-type-btn:hover i, .schema-type-btn:hover span {
    color: white;
}

.schema-type-btn.active {
    background: var(--gradient);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-primary);
    transform: translateY(-2px);
}

.schema-type-btn.active::before {
    left: 0;
}

.schema-type-btn.active i, .schema-type-btn.active span {
    color: white;
}

/* ============================================
   FORM CONTAINER
   ============================================ */
.form-container {
    padding: 28px;
    max-height: 600px;
    overflow-y: auto;
}

.form-container::-webkit-scrollbar {
    width: 6px;
}

.form-container::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 10px;
}

.form-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.form-group-custom {
    margin-bottom: 18px;
    animation: bounceInUp 0.5s var(--bounce) both;
}

.form-group-custom label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group-custom label i {
    color: var(--primary);
    font-size: 14px;
}

.form-control-custom {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    background: var(--light);
    border: 2px solid transparent;
    border-radius: 10px;
    transition: all 0.3s var(--bounce);
    color: var(--dark);
}

.form-control-custom:focus {
    outline: none;
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.form-control-custom::placeholder {
    color: #94a3b8;
}

textarea.form-control-custom {
    resize: vertical;
    min-height: 80px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 576px) {
    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

.dynamic-item {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
    animation: bounceInUp 0.4s var(--bounce) both;
    transition: all 0.3s;
}

.dynamic-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.dynamic-item .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--danger);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s var(--bounce);
}

.dynamic-item .remove-btn:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.add-btn {
    width: 100%;
    padding: 12px;
    background: var(--light);
    border: 2px dashed var(--primary);
    border-radius: 10px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s var(--bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    border-style: solid;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.action-buttons {
    padding: 20px 28px 28px;
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--border);
    background: var(--light);
}

.btn-generate, .btn-reset {
    flex: 1;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s var(--bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-generate {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-generate::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-generate:hover::before {
    width: 400px;
    height: 400px;
}

.btn-generate:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.btn-generate:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-reset {
    background: white;
    color: var(--gray);
    border: 2px solid var(--border);
    max-width: 140px;
}

.btn-reset:hover {
    background: var(--light);
    border-color: var(--danger);
    color: var(--danger);
    transform: translateY(-3px);
}

/* ============================================
   OUTPUT SECTION
   ============================================ */
.output-tabs {
    padding: 16px 24px 0;
    gap: 8px;
}

.output-tabs .nav-link {
    border: none;
    background: var(--light);
    color: var(--gray);
    padding: 8px 16px;
    border-radius: 10px 10px 0 0;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s var(--bounce);
}

.output-tabs .nav-link:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}

.output-tabs .nav-link.active {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow-primary);
}

.tab-content {
    padding: 0;
}

.code-wrapper {
    position: relative;
    background: #1e293b;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
}

.code-block {
    margin: 0;
    padding: 24px;
    max-height: 500px;
    overflow: auto;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #e2e8f0;
}

.code-block code {
    white-space: pre;
    word-break: normal;
}

.code-block::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.code-block::-webkit-scrollbar-track {
    background: #0f172a;
}

.code-block::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--bounce);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.copy-btn.copied {
    background: var(--success);
    border-color: var(--success);
    animation: pulse 0.5s ease;
}

/* JSON Syntax Highlighting */
.json-key { color: #93c5fd; }
.json-string { color: #86efac; }
.json-number { color: #fcd34d; }
.json-boolean { color: #fda4af; }
.json-null { color: #c4b5fd; }
.json-bracket { color: #e879f9; }

/* ============================================
   STATUS INDICATOR
   ============================================ */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--light);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
    transition: all 0.3s;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray);
    transition: all 0.3s;
}

.status-indicator.ready {
    background: #d1fae5;
    color: #065f46;
}

.status-indicator.ready .status-dot {
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    animation: pulse 1.5s infinite;
}

.status-indicator.success {
    background: #d1fae5;
    color: #065f46;
}

.status-indicator.success .status-dot {
    background: var(--success);
}

.status-indicator.error {
    background: #fee2e2;
    color: #991b1b;
}

.status-indicator.error .status-dot {
    background: var(--danger);
}

/* ============================================
   VALIDATION SECTION
   ============================================ */
.validation-section {
    padding: 20px 24px 24px;
    border-top: 1px solid var(--border);
    background: var(--light);
}

.validation-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.validation-title i {
    color: var(--primary);
}

.validation-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.validation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: white;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s var(--bounce);
    animation: slideInRight 0.4s var(--bounce) both;
}

.validation-item i {
    font-size: 16px;
    flex-shrink: 0;
}

.validation-item.pending {
    color: var(--gray);
}

.validation-item.pending i {
    color: var(--warning);
}

.validation-item.success {
    color: #065f46;
    border-left: 3px solid var(--success);
}

.validation-item.success i {
    color: var(--success);
}

.validation-item.error {
    color: #991b1b;
    border-left: 3px solid var(--danger);
}

.validation-item.error i {
    color: var(--danger);
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features-section {
    padding: 80px 0;
    background: white;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 0;
}

.feature-card {
    background: white;
    padding: 32px 24px;
    border-radius: 20px;
    border: 1px solid var(--border);
    height: 100%;
    transition: all 0.4s var(--bounce);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--bounce);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--gradient-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
    transition: all 0.4s var(--bounce);
}

.feature-card:hover .feature-icon {
    background: var(--gradient);
    color: white;
    transform: rotate(10deg) scale(1.1);
}

.feature-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 0;
    line-height: 1.6;
}

/* ============================================
   HOW TO SECTION
   ============================================ */
.how-to-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.step-card {
    background: white;
    padding: 32px 24px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    height: 100%;
    transition: all 0.4s var(--bounce);
    position: relative;
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-primary);
    transition: all 0.4s var(--bounce);
}

.step-card:hover .step-number {
    transform: rotate(360deg) scale(1.1);
}

.step-card h5 {
    font-weight: 700;
    margin-bottom: 8px;
}

.step-card p {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 0;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section {
    padding: 80px 0;
    background: white;
}

.custom-accordion .accordion-item {
    border: 1px solid var(--border);
    border-radius: 12px !important;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.custom-accordion .accordion-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
}

.custom-accordion .accordion-button {
    background: white;
    font-weight: 600;
    color: var(--dark);
    padding: 18px 20px;
    border: none;
    box-shadow: none !important;
}

.custom-accordion .accordion-button:not(.collapsed) {
    background: var(--gradient-soft);
    color: var(--primary-dark);
}

.custom-accordion .accordion-body {
    padding: 20px;
    color: var(--gray);
    line-height: 1.7;
    background: white;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 0;
    margin-top: 40px;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.footer-title {
    color: white;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.site-footer hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 40px 0 0;
}

.site-footer .text-muted {
    color: #94a3b8 !important;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .sticky-top-output {
        position: static;
    }
    .hero-section {
        padding: 50px 0 40px;
    }
    .tool-section, .features-section, .how-to-section, .faq-section {
        padding: 50px 0;
    }
}

@media (max-width: 768px) {
    .schema-type-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .hero-stats {
        gap: 8px;
    }
    .stat-pill {
        font-size: 12px;
        padding: 6px 12px;
    }
    .action-buttons {
        flex-direction: column;
    }
    .btn-reset {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .schema-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .card-header-custom {
        padding: 18px 20px;
    }
    .schema-type-selector, .form-container, .validation-section {
        padding: 18px 20px;
    }
}
