/**
 * TextTooly - Custom Styles
 * Aurora + Glassmorphism Design System
 */

/* Aurora Background Effect */
.aurora-bg {
    position: relative;
    overflow: hidden;
}

.aurora-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 80%, rgba(45, 106, 79, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(52, 211, 153, 0.2) 0%, transparent 40%);
    animation: aurora 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes aurora {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(5%, 5%) rotate(3deg);
    }

    66% {
        transform: translate(-5%, 2%) rotate(-3deg);
    }
}

/* Mobile Menu Styles */
#mobile-menu-overlay {
    transition: opacity 0.3s ease-out;
}

#mobile-menu-overlay:not(.hidden) {
    display: block;
    opacity: 1;
}

#mobile-menu {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
}

.dark .glass-card {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Light mode glass */
.glass-light {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.dark .glass-light {
    background: rgba(30, 41, 59, 0.6);
}

/* Tool Card Hover Animation */
.tool-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(45, 106, 79, 0.15);
}

.dark .tool-card:hover {
    box-shadow: 0 25px 50px -12px rgba(45, 106, 79, 0.25);
}

/* Glow Button */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #2D6A4F, #10B981, #2D6A4F);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-glow:hover::before {
    opacity: 1;
    animation: glow-rotate 3s linear infinite;
}

@keyframes glow-rotate {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

/* Tool Interface Styles */
.tool-textarea {
    font-family: 'Fira Code', monospace;
    resize: vertical;
    min-height: 200px;
}

.tool-textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.2);
}

/* Stats Counter Animation */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Breadcrumb Styles */
.breadcrumb-link {
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #2D6A4F;
}

/* FAQ Accordion */
.faq-item {
    transition: all 0.2s ease;
}

.faq-item[open] .faq-icon {
    transform: rotate(180deg);
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection Color */
::selection {
    background: rgba(45, 106, 79, 0.3);
    color: inherit;
}

/* Smooth Page Transitions */
.page-transition {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category Card Gradient Border */
.category-card {
    position: relative;
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
}

.dark .category-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.3), rgba(16, 185, 129, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Tooltip Styles */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: #1e293b;
    color: white;
    font-size: 0.75rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 8px);
}

/* Input Focus Ring */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    ring: 2px;
    ring-color: rgba(45, 106, 79, 0.5);
}

/* Clean Typography / Prose Styles */
.prose {
    color: #475569;
    line-height: 1.75;
}

.dark .prose {
    color: #94a3b8;
}

.prose h3 {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.25em;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

.dark .prose h3 {
    color: #fff;
}

.prose p {
    margin-bottom: 1.25em;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.625em;
    margin-bottom: 1.25em;
}

.prose li {
    margin-bottom: 0.5em;
}

.prose strong {
    color: #1e293b;
    font-weight: 600;
}

.dark .prose strong {
    color: #fff;
}

/* Print Styles */
@media print {

    nav,
    footer,
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}