/* Ruammit Online - Main Stylesheet */
/* Modern Mobile-First Responsive Design */

/* CSS Variables for theming */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #f59e0b;
    --secondary-dark: #d97706;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --gray-50: #f9fafb;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --box-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --box-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --box-shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--box-shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition);
}

.header:hover {
    box-shadow: var(--box-shadow-lg);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.logo i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: none;
    list-style: none;
    gap: 2rem;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: var(--box-shadow);
    padding: 1rem;
    margin: 0;
}

.nav-menu.active {
    display: flex;
}

.nav-link {
    color: var(--gray-600);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    display: block;
    border-radius: var(--border-radius);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.1);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.1);
}

.nav-link.active::after {
    width: 80%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-600);
}

/* Hero Section */
.hero {
    background: var(--gradient-hero);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(100px, 100px);
    }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out;
    line-height: 1.2;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out 0.2s both;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    box-shadow: var(--box-shadow-md);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: var(--transition);
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn-secondary:hover {
    background: #d97706;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    box-shadow: var(--box-shadow-md);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
    transform: translateY(-2px);
}

/* Bento Grid Section */
.bento-grid-section {
    padding: 3rem 0;
    background: var(--gray-50);
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.bento-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--box-shadow-md);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.bento-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--box-shadow-hover);
    border-color: var(--primary-light);
}

.bento-item:hover::before {
    transform: scaleX(1);
}

.bento-item.featured {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.bento-item.featured::before {
    background: rgba(255, 255, 255, 0.3);
}

.bento-item.featured .bento-title {
    color: white;
}

.bento-item.featured:hover {
    box-shadow: var(--box-shadow-glow);
}

.bento-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.bento-item:hover .bento-icon {
    transform: scale(1.1) rotate(5deg);
}

.bento-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.bento-description {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.5;
}

.bento-item.featured .bento-description {
    color: rgba(255, 255, 255, 0.9);
}

.bento-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Category Sections */
.category-section {
    padding: 5rem 0;
    background: white;
    position: relative;
}

.category-section:nth-child(even) {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.category-header {
    text-align: center;
    margin-bottom: 3rem;
}

.category-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.category-description {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Tool Cards */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.tool-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--box-shadow-md);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.tool-card>* {
    position: relative;
    z-index: 1;
}

.tool-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.tool-card:hover::before {
    opacity: 0.05;
}

.tool-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow-md);
    transition: var(--transition);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--box-shadow-glow);
}

.tool-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.tool-description {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Tool Pages */
.tool-page {
    padding: 2rem 0;
}

.tool-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.tool-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.tool-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.form-input,
.form-select,
.form-textarea {
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.form-check-label {
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Results Section */
.results-section {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-top: 2rem;
    display: none;
}

.results-section.show {
    display: block;
}

.result-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.result-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 1.125rem;
    color: var(--dark-color);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--dark-color) 100%);
    color: white;
    padding: 4rem 0 1rem;
    margin-top: 5rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.social-link:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--box-shadow-glow);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-400);
    transition: var(--transition);
    position: relative;
    display: inline-block;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-700);
    color: var(--gray-400);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 1rem;
}

.p-4 {
    padding: 1.5rem;
}

.p-5 {
    padding: 3rem;
}

/* Improved Mobile Experience */
@media (max-width: 639px) {
    .tool-container {
        padding: 1.5rem;
    }

    .accordion-button {
        padding: 1rem 1.25rem;
        font-size: 0.9375rem;
    }

    .accordion-body {
        padding: 1.25rem;
        font-size: 0.9375rem;
    }

    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .btn {
        width: 100%;
        padding: 1rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }

    .results-section {
        padding: 1.5rem;
    }

    .result-item {
        padding: 1rem;
    }

    .tool-header h1 {
        font-size: 1.75rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

/* Responsive Design */
@media (min-width: 640px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-item.featured {
        grid-column: span 2;
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 3rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-grid-section {
        padding: 4rem 0;
    }
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex !important;
        flex-direction: row;
        position: static;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .menu-toggle {
        display: none;
    }

    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .bento-item.featured {
        grid-column: span 2;
        grid-row: span 1;
    }

    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .btn-group {
        justify-content: center;
        gap: 1rem;
    }

    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }

    .bento-grid-section {
        padding: 5rem 0;
    }

    .adsense-section {
        padding: 3rem 0;
    }
}

@media (min-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }

    .bento-item.featured {
        grid-column: span 2;
        grid-row: span 2;
    }

    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero p {
        font-size: 1.5rem;
    }

    .bento-grid-section {
        padding: 6rem 0;
    }

    .container {
        padding: 0 2rem;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* AdSense Section */
.adsense-section {
    padding: 2rem 0;
    background: white;
}

/* AdSense Container */
.adsense-container {
    margin: 0 auto;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adsense-container.inline {
    max-width: 728px;
    width: 100%;
}

.adsense-container.sidebar {
    position: sticky;
    top: 100px;
    max-width: 300px;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 1rem 0;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    margin-top: 0;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--gray-400);
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumbs li:last-child {
    color: var(--gray-800);
    font-weight: 500;
}

/* Custom Accordion Styles */
.accordion {
    margin-top: 2rem;
}

.accordion-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition);
}

.accordion-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--box-shadow-md);
}

.accordion-header {
    margin: 0;
}

.accordion-button {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: var(--gray-50);
    border: none;
    text-align: left;
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    position: relative;
    outline: none;
}

.accordion-button::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary-color);
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 1rem;
}

.accordion-button:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

.accordion-button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.accordion-button.active {
    background: var(--primary-color);
    color: white;
}

.accordion-button.active::after {
    content: '−';
    color: white;
    transform: rotate(180deg);
}

.accordion-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 1.5rem;
}

.accordion-collapse.show {
    max-height: 5000px;
    padding: 1.5rem;
}

.accordion-body {
    color: var(--gray-700);
    line-height: 1.8;
}

.accordion-body h5 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.accordion-body h5:first-child {
    margin-top: 0;
}

.accordion-body h6 {
    color: var(--secondary-color);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.accordion-body ul,
.accordion-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.accordion-body li {
    margin-bottom: 0.5rem;
}

.accordion-body table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.accordion-body table th,
.accordion-body table td {
    border: 1px solid var(--gray-300);
    padding: 0.75rem;
    text-align: left;
}

.accordion-body table th {
    background-color: var(--gray-100);
    font-weight: 600;
    color: var(--gray-800);
}

.accordion-body table tr:nth-child(even) {
    background-color: var(--gray-50);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Accessibility Improvements */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 var(--border-radius) 0;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {

    .header,
    .footer,
    .btn,
    .nav,
    .adsense-container {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .tool-container {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }

    .accordion-button {
        background: white !important;
        color: var(--gray-900) !important;
    }

    .accordion-collapse {
        max-height: none !important;
        display: block !important;
    }
}

/* ==========================================
   NEW FEATURES - PHASE 2 IMPLEMENTATION
   ========================================== */

/* Search Bar */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.search-bar {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3rem;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    font-size: 1rem;
    background: white;
    transition: var(--transition);
    box-shadow: var(--box-shadow-md);
}

.search-bar:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--box-shadow-glow);
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1rem;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-result-item:hover {
    background: var(--gray-50);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item .result-icon {
    font-size: 1.5rem;
}

.search-result-item .result-info h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--dark-color);
}

.search-result-item .result-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Stats Counter Section */
.stats-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: block;
    color: white;
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 3.5rem;
    }
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
    color: white;
    display: block;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--box-shadow-lg);
    transition: var(--transition);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--box-shadow-glow);
}

/* Dark Mode Styles */
body.dark-mode {
    --gray-50: #1a1a2e;
    --gray-100: #16213e;
    --gray-200: #0f3460;
    --gray-300: #1a4d7c;
    --gray-400: #4a789c;
    --gray-500: #7da3c2;
    --gray-600: #a8c5db;
    --gray-700: #d1e1ed;
    --gray-800: #e8f1f8;
    --gray-900: #f5f9fc;
    --light-color: #1a1a2e;
    --dark-color: #f5f9fc;
    background: linear-gradient(180deg, #0a0a14 0%, #1a1a2e 100%);
    color: var(--gray-800);
}

body.dark-mode .header {
    background: rgba(26, 26, 46, 0.95);
    border-bottom-color: rgba(15, 52, 96, 0.8);
}

body.dark-mode .tool-container,
body.dark-mode .bento-item:not(.featured),
body.dark-mode .tool-card {
    background: rgba(26, 26, 46, 0.9);
    border-color: var(--gray-200);
}

body.dark-mode .footer {
    background: linear-gradient(135deg, #0a0a14 0%, #1a1a2e 100%);
}

body.dark-mode .search-bar,
body.dark-mode .search-results,
body.dark-mode .form-input,
body.dark-mode .form-select,
body.dark-mode .form-textarea {
    background: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--gray-800);
}

body.dark-mode .category-section {
    background: var(--gray-50);
}

body.dark-mode .category-section:nth-child(even) {
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--box-shadow-lg);
    transition: var(--transition);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-glow);
}

/* Testimonials Section */
.testimonials-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, #ffffff 0%, var(--gray-50) 100%);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--box-shadow-md);
    position: relative;
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 4rem;
    color: var(--primary-light);
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-content {
    margin-bottom: 1.5rem;
    color: var(--gray-700);
    font-style: italic;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.testimonial-info h4 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1rem;
}

.testimonial-info p {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.85rem;
}

.testimonial-stars {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Related Tools Section */
.related-tools {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-200);
}

.related-tools h3 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .related-tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.related-tool-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--gray-700);
    transition: var(--transition);
    border: 1px solid transparent;
}

.related-tool-item:hover {
    background: white;
    border-color: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-md);
}

.related-tool-item .tool-emoji {
    font-size: 1.5rem;
}

.related-tool-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-md);
}

.share-btn.line {
    background: #00B900;
    color: white;
}

.share-btn.whatsapp {
    background: #25D366;
    color: white;
}

.share-btn.facebook {
    background: #1877F2;
    color: white;
}

.share-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.share-btn.copy {
    background: var(--gray-200);
    color: var(--gray-700);
}

.share-btn.copy:hover {
    background: var(--gray-300);
}

/* Newsletter Section */
.newsletter-section {
    background: var(--gradient-primary);
    padding: 3rem 0;
    color: white;
    text-align: center;
}

.newsletter-section h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.newsletter-section p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 1rem 2rem;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number.animate {
    animation: countUp 0.6s ease-out forwards;
}

/* Footer Bottom Links Enhancement */
.footer-bottom-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-bottom-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-bottom-links a:hover {
    color: white;
}

/* Improved Hero Section */
.hero-search {
    margin-top: 2rem;
}

.hero-search .search-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Recent Tools Widget */
.recent-tools-widget {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow-md);
    margin-bottom: 2rem;
}

.recent-tools-widget h4 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark-color);
}

.recent-tools-list {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.recent-tool-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
}

.recent-tool-chip:hover {
    background: var(--primary-light);
    color: white;
}

/* Popular Badge Animation */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.bento-badge {
    animation: pulse 2s infinite;
}

/* Smooth Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.scroll-indicator a {
    color: white;
    opacity: 0.8;
    font-size: 1.5rem;
    text-decoration: none;
}

.scroll-indicator a:hover {
    opacity: 1;
}

/* Dark Mode - Keep result items readable */
body.dark-mode .result-item,
body.dark-mode .results-section .results-container {
    background: white;
    color: #1e293b;
}

body.dark-mode .result-label {
    color: #64748b;
}

body.dark-mode .result-value {
    color: #1e293b;
}

body.dark-mode .form-label {
    color: var(--gray-800);
}

body.dark-mode .text-muted {
    color: var(--gray-600);
}