/*
Theme Name: HumanizePress
Theme URI: https://humanize.ai
Author: Humanize.ai Team
Author URI: https://humanize.ai
Description: A sophisticated child theme for GeneratePress that transforms AI text into natural human writing. Features a modern dark gradient design with purple accents, perfect for professional AI humanization services.
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Template: generatepress
Text Domain: humanizepress
*/

/* Scrollbar Styling - Match Mockup */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(17, 24, 39, 0.5);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #a78bfa, #9333ea);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #c4b5fd, #a78bfa);
    background-clip: padding-box;
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #9333ea rgba(17, 24, 39, 0.5);
}

/* Variables */
:root {
    --primary-color: #9333ea;
    --primary-hover: #7c3aed;
    --secondary-color: #a78bfa;
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    --text-faded: #4b5563;
    --bg-dark: #000000;
    --bg-darker: #111827;
    --bg-card: rgba(17, 24, 39, 0.5);
    --bg-card-solid: rgba(17, 24, 39, 0.3);
    --border-color: #1f2937;
    --border-light: #374151;
    --success-color: #34d399;
    --error-color: #f87171;
    --gradient-primary: linear-gradient(to right, #a78bfa, #9333ea);
    --gradient-bg: linear-gradient(to bottom right, #000000, #111827, #000000);
}

/* Reset GeneratePress defaults */
body {
    background: var(--gradient-bg) !important;
    color: var(--text-primary) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    line-height: 1.6;
    min-height: 100vh;
}

/* Ensure proper box-sizing for all elements */
* {
    box-sizing: border-box;
}

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden;
}

/* Override GP container - Direct from mockup */
.grid-container,
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* GeneratePress Navigation Styling - Using Mockup CSS */
.main-navigation {
    background: transparent !important;
    padding: 24px 0;
}

/* Make GP navigation use container styling from mockup */
.main-navigation .inside-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hide GP's site header but keep navigation */
.site-header {
    display: none;
}

/* Logo in navigation */
.nav-logo {
    order: -1;
    margin-right: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.logo svg {
    width: 20px;
    height: 20px;
}

/* Icons - Direct from mockup */
.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
}

/* Ensure SVG icons inherit colors properly */
svg {
    fill: currentColor;
}

/* Fix for specific icon containers */
.use-case-card svg,
.feature-card svg {
    display: block;
}

/* Main menu styling - Direct from mockup */
.main-nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    margin: 0;
}

/* Direct nav-links styling from mockup */
.main-nav ul li a {
    color: #d1d5db !important; /* Exact color from mockup */
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 400;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 16px; /* Match mockup */
    position: relative;
    padding-bottom: 4px;
}

/* Underline animation for menu items (not buttons) */
.main-nav ul li:not(.btn-primary):not(.nav-cta) a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #a78bfa;
    transition: width 0.3s ease;
}

.main-nav ul li:not(.btn-primary):not(.nav-cta) a:hover::after,
.main-nav ul li.current-menu-item:not(.btn-primary):not(.nav-cta) a::after {
    width: 100%;
}

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a {
    color: #a78bfa !important; /* Exact hover color from mockup */
    background: transparent !important;
}

/* Remove GP's default menu item styling */
.main-navigation .main-nav ul li a {
    padding: 0 0 4px 0; /* Keep bottom padding for underline */
    line-height: normal;
}

.main-navigation .main-nav ul li {
    float: none;
    position: relative;
}

/* Remove focus outline that GP adds */
.main-navigation .main-nav ul li a:focus {
    background: transparent !important;
    color: var(--secondary-color);
}

/* CTA Button in menu - Direct from mockup */
.main-nav .btn-primary a,
.main-nav .btn.btn-primary a,
.nav-cta a.btn-primary,
.nav-cta a {
    background-color: #9333ea !important;
    color: white !important;
    padding: 8px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
}

.main-nav .btn-primary a:hover,
.main-nav .btn.btn-primary a:hover,
.nav-cta a.btn-primary:hover,
.nav-cta a:hover {
    background-color: #7c3aed !important;
    transform: scale(1.05);
    color: white !important;
}

/* Hide GP's mobile menu button */
.menu-toggle {
    display: none;
}

/* Custom mobile menu button */
@media (max-width: 768px) {
    .menu-toggle {
        display: inline-block !important;
        background: none;
        border: none;
        color: white;
        font-size: 18px;
        padding: 4px;
        position: absolute !important;
        right: 16px !important;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Hide menu toggle when nav is empty or has no items */
    .main-nav:empty + .menu-toggle,
    .main-nav ul:empty + .menu-toggle,
    body:not(.has-menu-items) .menu-toggle {
        display: none !important;
    }
    
    /* Also hide if primary-menu has no children */
    #primary-menu:empty ~ .menu-toggle {
        display: none !important;
    }
    
    /* Hide menu toggle by default, show only when menu exists */
    .menu-toggle.has-menu {
        display: inline-block !important;
    }
    
    .menu-toggle:not(.has-menu) {
        display: none !important;
    }
    
    .menu-toggle::before {
        content: "☰";
        font-family: inherit;
    }
    
    .menu-toggle .gp-icon,
    .menu-toggle .mobile-menu {
        display: none;
    }
}

/* Remove default GP dropdown arrows */
.dropdown-menu-toggle {
    display: none;
}

/* Mobile menu control wrapper - hide the extra one */
#mobile-menu-control-wrapper {
    display: none !important;
}

/* Responsive menu styling */
@media (min-width: 769px) {
    .main-navigation.toggled .main-nav > ul {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(17, 24, 39, 0.95);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-color);
        z-index: 1000;
    }
    
    .main-nav ul {
        display: none;
        flex-direction: column;
        padding: 24px;
        gap: 16px;
    }
    
    .main-navigation.toggled .main-nav ul {
        display: flex;
    }
    
    .main-nav ul li {
        width: 100%;
    }
    
    .main-nav ul li a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    
    .nav-cta a.btn-primary {
        width: 100%;
        text-align: center;
    }
    
    .nav-logo {
        flex: 1;
    }
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding-bottom: 48px;
    padding-top: 0px;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 24px;
    background: linear-gradient(to right, #ffffff, #e9d5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-description {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Feature Tags */
.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    font-size: 14px;
}

.feature-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(31, 41, 55, 0.5);
    padding: 8px 16px;
    border-radius: 8px;
}

.feature-tag svg {
    width: 20px;
    height: 20px;
    fill: var(--success-color);
}

/* Text Enhancement Tool */
.tool-container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    width: 100%;
}

.period-countdown {
    font-size: 12px;
}



.text-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;    
    width: 100%;
    box-sizing: border-box;
}

.text-box-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.textarea-container {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.text-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-box-label {
    font-size: 18px;
    font-weight: bold;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-box-hint {
    font-size: 12px;
    color: var(--text-dim);
}

.humanize-textarea {
    width: 100%;
    height: 320px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    resize: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
    min-width: 0;
}

.humanize-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.humanize-textarea::placeholder {
    color: var(--text-dim);
}

/* Word Counter */
.word-counter {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.words-count {
    color: var(--text-dim);
}

.words-remaining {
    color: var(--success-color);
}

.words-remaining.over-limit {
    color: var(--error-color);
}

/* Buttons */
.humanize-button,
.btn-humanize {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(to right, #9333ea, #7c3aed);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0 auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.humanize-button:hover:not(:disabled),
.btn-humanize:hover {
    transform: scale(1.05);
    background: linear-gradient(to right, #7c3aed, #6d28d9);
    color: white;
}

.humanize-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.humanize-button svg,
.btn-humanize svg {
    width: 16px;
    height: 16px;
}

/* Primary Button Override */
.button,
.wp-block-button__link {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    text-decoration: none;
}

.button:hover,
.wp-block-button__link:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
    color: white;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 40px auto 0;
    margin-bottom: 40px;
}

.stat-card {
    text-align: center;
    background: var(--bg-card-solid);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: var(--secondary-color);
}

.stat-label {
    color: var(--text-muted);
}

/* Section Styles */
.section {
    padding: 80px 0;
}

.section-dark {
    background: var(--bg-card-solid);
}

.section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 48px;
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.step-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.step-number {
    background: var(--primary-color);
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 24px;
    margin-bottom: 24px;
}

.step-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.step-list {
    color: var(--text-muted);
    list-style: none;
    padding: 0;
}

.step-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

/* Use Cases Grid */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.use-case-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s;
}

.use-case-card:hover {
    border-color: var(--primary-color);
}

svg.use-case-icon,
.use-case-icon {
    width: 40px;
    height: 40px;
    color: #a855f7;
    margin-bottom: 16px;
    fill: currentColor;
}

.use-case-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.use-case-description {
    color: var(--text-muted);
    font-size: 14px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.feature-icon svg,
svg.feature-icon {
    width: 48px;
    height: 48px;
    color: #a855f7;
    fill: currentColor;
}

.feature-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
    font-size: 14px;
    color: var(--text-dim);
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.feature-list svg {
    width: 20px;
    height: 20px;
    fill: var(--success-color);
}

/* Footer */
.site-footer {
    padding: 48px 0;
    border-top: 1px solid var(--border-color);
    background: transparent !important;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    color: var(--text-faded);
    font-size: 14px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop/Tablet - Viewport Height Responsive */
@media (min-width: 769px) {
    /* Ensure text-boxes are always visible on different screen heights */
    .hero-section {
        padding-bottom: clamp(24px, 4vh, 48px);
    }
    
    .hero-title {
        font-size: clamp(32px, 4.5vw, 48px);
        margin-bottom: clamp(16px, 2.5vh, 24px);
    }
    
    /* For shorter viewports (laptops, small desktop screens) */
    @media (max-height: 900px) {
        /* Scale down the entire tool container to fit */
        .tool-container {
            transform: scale(0.95);
            transform-origin: top center;
            margin-bottom: -20px; /* Compensate for scale */
        }
        
        .hero-section {
            padding-bottom: 24px;
        }
        
        .hero-title {
            font-size: 38px;
            margin-bottom: 16px;
        }
        
        .hero-description {
            margin-bottom: 20px;
        }
    }
    
    /* For shorter viewports */
    @media (max-height: 800px) {
        .tool-container {
            transform: scale(0.9);
            transform-origin: top center;
            margin-bottom: -40px;
        }
        
        .hero-title {
            font-size: 36px;
        }
    }
    
    /* For very short viewports */
    @media (max-height: 700px) {
        .tool-container {
            transform: scale(0.85);
            transform-origin: top center;
            margin-bottom: -60px;
        }
        
        .hero-title {
            font-size: 34px;
        }
        
        .hero-section {
            padding-bottom: 16px;
        }
    }
    
    /* For extremely short viewports */
    @media (max-height: 600px) {
        .tool-container {
            transform: scale(0.75);
            transform-origin: top center;
            margin-bottom: -100px;
        }
        
        .hero-title {
            font-size: 30px;
            margin-bottom: 12px;
        }
        
        .hero-description {
            font-size: 14px;
            margin-bottom: 16px;
        }
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    
    /* Mobile Logo - Keep larger size but prevent wrapping */
    .nav-logo .site-name,
    .logo .site-name {
        font-size: 22px !important;
        white-space: nowrap;
        line-height: 1.2;
    }
    
    .nav-logo {
        flex: 1;
        max-width: 75%;
    }
    
    /* Adjust navigation container to allow menu-toggle to move right */
    .main-navigation .inside-navigation {
        padding-right: 0 !important;
        overflow: visible !important;
    }
    
    /* Mobile Navigation */
    .site-header {
        position: relative;
    }
    
    .header-navigation {
        flex-wrap: wrap;
    }
    
    .header-navigation.center-align {
        display: flex;
        justify-content: space-between;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(17, 24, 39, 0.95);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-top: 1px solid var(--border-color);
        z-index: 1000;
        width: 100%;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 16px;
    }
    
    .nav-links a,
    .nav-links .btn-primary {
        width: 100%;
        text-align: center;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Reset alignment options for mobile */
    .header-navigation.right-align .nav-links {
        flex-direction: column;
        margin: 0;
    }
    
    .steps-grid,
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 24px;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    margin-bottom: 16px;
}

.spinner {
    animation: rotate 2s linear infinite;
    height: 50px;
    width: 50px;
}

.spinner .path {
    stroke: var(--secondary-color);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.loading-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Override GP content area */
.site-content {
    padding: 0;
}

.content-area {
    width: 100%;
}

/* Remove GP page title */
.page .entry-header {
    display: none;
}

/* Hide GeneratePress mobile menu */
#mobile-menu-control-wrapper,
.mobile-menu-control-wrapper {
    display: none !important;
}

/* Logo styling when using GP custom logo */
.logo .custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.logo .custom-logo {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.logo .site-name {
    font-size: 24px;
    font-weight: bold;
}

/* GeneratePress Integration */
/* Transparent header support */
.transparent-header nav.container {
    background: transparent;
    position: absolute;
    width: 100%;
    z-index: 100;
}

.transparent-header .hero-section {
    padding-top: 120px;
}

/* Sticky navigation support (GP Premium) */
.sticky-enabled nav.container {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.sticky-enabled body {
    padding-top: 72px; /* Height of navigation */
}

/* Links */
a {
    color: var(--secondary-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

/* Form elements */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 8px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Output Controls */
.output-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Toggle Highlight Button */
.toggle-highlight {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-highlight:hover {
    background: rgba(17, 24, 39, 0.7);
    border-color: var(--primary-color);
    color: var(--secondary-color);
}

.toggle-highlight[aria-pressed="true"] {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.highlight-icon {
    width: 16px;
    height: 16px;
}

/* Highlighted Output */
.highlighted-output {
    min-height: 320px;
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.8;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
}

.highlighted-output mark {
    background: rgba(167, 139, 250, 0.3);
    border-radius: 3px;
    padding: 2px 0;
    border-bottom: 2px solid var(--secondary-color);
    color: inherit;
}

.highlighted-output mark.humanizeai-changed {
    animation: highlight-fade 2s ease-out;
}

@keyframes highlight-fade {
    0% {
        background: rgba(167, 139, 250, 0.5);
        box-shadow: 0 0 8px rgba(167, 139, 250, 0.4);
    }
    100% {
        background: rgba(167, 139, 250, 0.3);
        box-shadow: none;
    }
}

/* Copy button */
.copy-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.copy-button:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.copy-button svg {
    width: 16px;
    height: 16px;
}

/* HumanizeAI Form Layout - 2-Column Grid for Controls */
.left-controls-grid {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 20px;    
    align-items: center;  /* Middle/center alignment for both columns */
    width: 100%;
    min-height: 44px;
}

/* Ensure grid container isn't being overridden */
.humanizeai-form .left-controls-grid,
form.humanizeai-form .left-controls-grid {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    width: 100% !important;
    align-items: center !important;
}

/* Fix for flex containers that might be interfering */
.humanizeai-form .text-box-wrapper .left-controls-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(200px, auto) !important;
    align-items: center !important;
}

/* Word Counter Column */
.word-counter-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-self: start;
    align-self: start;  /* Changed from 'end' to 'start' for top alignment */
}

.words-count {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.2;
}

.words-remaining {
    font-size: 14px;
    color: var(--success-color);
    font-weight: 500;
    line-height: 1.2;
}

/* CAPTCHA and Button Column */
.captcha-button-column {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    justify-self: end;
    align-items: flex-end;
    align-self: start;  /* Added for top alignment */
    width: 100%;
    max-width: 280px;
}

/* Ensure both columns are visible */
.left-controls-grid > div {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.turnstile-container {
    margin: 0;
    display: flex;
    justify-content: flex-start; /* Align captcha to the left */
}

/* Right Controls */
.right-controls {
    margin-top: 20px;
    text-align: center;
}

.right-controls.show {
    display: block !important;
}

/* Override base button margin for captcha-button-column specifically */
.captcha-button-column .humanize-button,
.captcha-button-column .btn-humanize {
    margin: 0 0 20px auto !important;  /* Right align with 20px bottom margin */
}

/* Override specific button styles for the form */
.humanizeai-form .captcha-button-column .humanize-button,
.humanizeai-form .captcha-button-column .btn-humanize,
form.humanizeai-form .humanize-button,
form.humanizeai-form .btn-humanize {
    padding: 12px 20px !important;
    font-size: 14px !important;
    max-width: 200px !important;
    height: 44px !important;
    gap: 8px !important;
    margin: 0 0 20px auto !important;  /* Right align with 20px bottom margin */
    width: auto !important;
    font-weight: 600 !important;
    line-height: 1 !important;
}

/* Ensure icon size is correct */
.humanizeai-form .humanize-button svg,
.humanizeai-form .btn-humanize svg {
    width: 16px !important;
    height: 16px !important;
}

/* Mobile Responsive Layout - Fix all layout issues */
@media (max-width: 768px) {
    /* Fix textbox container overflow */
    .tool-container {
        padding: 16px !important;
        margin: 0 auto;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix text boxes grid for mobile */
    .text-boxes {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        margin-bottom: 24px !important;
    }
    
    /* Ensure textareas stay within container */
    .text-box-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .humanize-textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }
    
    .textarea-container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    /* Mobile layout for controls - stack vertically */
    .left-controls-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        margin-top: 16px !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    /* Word counter section - centered on mobile */
    .word-counter-column {
        justify-self: center !important;
        align-self: start !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        order: 1;
    }
    
    .words-count {
        font-size: 16px;
        margin-bottom: 4px;
        text-align: center !important;
    }
    
    .words-remaining {
        font-size: 14px;
        text-align: center !important;
    }
    
    /* Button and CAPTCHA section */
    .captcha-button-column {
        justify-self: stretch !important;
        align-items: stretch !important;
        max-width: none !important;
        width: 100% !important;
        order: 2;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    /* Make button full width on mobile */
    .captcha-button-column .humanize-button,
    .captcha-button-column .btn-humanize {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
        height: auto !important;
        order: 2;
    }
    
    /* Center CAPTCHA on mobile */
    .turnstile-container {
        justify-content: center !important;
        width: 100% !important;
        order: 3;
        margin-top: 8px;
    }
    
    /* Output controls mobile adjustments */
    .right-controls {
        margin-top: 16px !important;
        text-align: center;
    }
    
    .copy-button {
        width: 100% !important;
        justify-content: center;
        padding: 12px 20px;
    }
    
    /* Mobile text box headers */
    .text-box-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    .output-controls {
        align-self: stretch !important;
        justify-content: space-between !important;
        width: 100% !important;
    }
    
    /* Ensure proper spacing and containment */
    .text-box-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    /* Options grid mobile */
    .humanizeai-options {
        padding: 16px !important;
        margin-bottom: 16px !important;
    }
    
    .options-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .option-select {
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
    }
    
    /* Advanced options mobile */
    .toggle-advanced {
        padding: 12px 16px !important;
        font-size: 16px !important;
    }
    
    .advanced-content {
        padding: 16px !important;
    }
    
    .custom-instructions-textarea {
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        min-height: 120px !important;
    }
}

/* Extra small mobile devices (320px and below) */
@media (max-width: 480px) {
    /* Slightly smaller logo text for very small screens */
    .nav-logo .site-name,
    .logo .site-name {
        font-size: 20px !important;
    }
    
    /* Even smaller menu toggle for tiny screens */
    .menu-toggle {
        font-size: 16px !important;
        padding: 2px !important;
        right: 12px !important;
    }
    
    .tool-container {
        padding: 12px !important;
        margin: 0;
    }
    
    .text-boxes {
        gap: 16px !important;
    }
    
    .humanize-textarea {
        height: 280px !important;
        padding: 12px !important;
        font-size: 16px !important;
    }
    
    .left-controls-grid {
        gap: 12px !important;
        margin-top: 12px !important;
    }
    
    .captcha-button-column .humanize-button {
        padding: 12px 16px !important;
        font-size: 15px !important;
    }
    
    .text-box-label {
        font-size: 16px !important;
    }
    
    .text-box-hint {
        font-size: 11px !important;
    }
    
    .humanizeai-options {
        padding: 12px !important;
    }
    
    .option-select {
        padding: 10px 12px !important;
        font-size: 15px !important;
    }
    
    .toggle-advanced {
        padding: 10px 12px !important;
        font-size: 15px !important;
    }
}

/* HumanizeAI Plugin Options Integration */
.humanizeai-options {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    margin-top: 40px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.option-group {
    display: flex;
    flex-direction: column;
}

.option-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.option-select {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(17, 24, 39, 0.7);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-select:hover {
    border-color: var(--primary-color);
    background: rgba(17, 24, 39, 0.9);
}

.option-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

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

/* Advanced Options Accordion */
.advanced-options {
    margin-top: 24px;
}

.toggle-advanced {
    width: 100%;
    background: rgba(17, 24, 39, 0.5);
    border: 2px solid var(--border-color);
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.toggle-advanced:hover {
    background: rgba(17, 24, 39, 0.7);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.toggle-advanced:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.toggle-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: var(--secondary-color);
}

.toggle-advanced[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.advanced-content {
    margin-top: 20px;
    padding: 24px;
    background: rgba(17, 24, 39, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    backdrop-filter: blur(8px);
}

.custom-instructions-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
}

.custom-instructions-textarea::placeholder {
    color: var(--text-dim);
}

.custom-instructions-textarea:hover {
    border-color: var(--border-light);
}

.custom-instructions-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
    background: rgba(0, 0, 0, 0.7);
}

/* HumanizeAI Plugin Message Styles - Bootstrap Alert Style */
.humanizeai-message {
    max-width: 600px;
    margin: 20px auto 0;
    padding: 12px 20px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    border: 1px solid transparent;
}

.humanizeai-message.success {
    background-color: #d1f2eb;
    border-color: #c3e6cb;
    color: #155724;
}

.humanizeai-message.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    font-weight: 600;
}
