:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --dark-text: #1e293b;
    --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;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--gray-800);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    line-height: 1.6;
}

main {
    flex: 1;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--gray-900) !important;
}

.min-vh-75 {
    min-height: 75vh;
}

.card {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    transition: border-color 0.2s ease;
    box-shadow: none;
}

.card:hover {
    border-color: var(--gray-300);
    transform: none;
}

.btn {
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    transform: none;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid var(--gray-300);
    padding: 0.75rem;
    background-color: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.alert {
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

.badge {
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

.form-check.card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-check.card:hover {
    background-color: var(--light-bg);
    border-color: var(--primary-color);
}

.form-check-input:checked ~ .form-check-label {
    color: var(--primary-color);
    font-weight: 600;
}

#imagePreview img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#results img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #E0E0E0;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.table {
    font-size: 0.95rem;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: var(--dark-text);
    background-color: var(--light-bg);
}

footer {
    margin-top: auto;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Typography */
    .display-4 {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    .display-5 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }

    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    /* Spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    /* Buttons - Larger touch targets */
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .btn-group .btn,
    .btn-sm {
        width: auto;
        min-height: 44px;
    }

    /* Forms - Better touch targets */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents iOS zoom */
        min-height: 48px;
        padding: 0.875rem 1rem;
    }

    /* Hero sections */
    .hero-section {
        min-height: auto !important;
        padding: 3rem 0 !important;
    }

    .min-vh-75 {
        min-height: auto;
    }

    /* Code blocks */
    .code-block {
        padding: 1rem;
        font-size: 0.85rem;
        overflow-x: auto;
    }

    /* Tables */
    .table-responsive {
        font-size: 0.875rem;
    }

    /* Modals */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 12px;
    }

    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Pricing cards */
    .pricing-card {
        margin-bottom: 1.5rem;
    }

    /* Stats and metrics */
    .stat-card {
        margin-bottom: 1rem;
    }

    /* Navigation spacing */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }

    /* Hide decorative elements on mobile */
    .floating-element,
    .pixelpanda-illustration {
        display: none;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Gumroad-style Navigation */
.navbar-custom {
    background: white !important;
    border-bottom: 1px solid #d1d5db;
    padding: 1.25rem 0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    z-index: 1000;
}

.navbar-custom .navbar-brand {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    text-decoration: none;
}

.navbar-custom .nav-link {
    color: #6b7280 !important;
    font-weight: 600 !important;
    font-size: 1.125rem !important;
    margin: 0 1.5rem;
    padding: 0.75rem 0 !important;
    transition: color 0.15s ease;
    border: none;
    background: none;
}

.navbar-custom .nav-link:hover {
    color: #111827 !important;
}

.navbar-custom .btn-signin {
    background: none;
    color: #6b7280 !important;
    padding: 0.75rem 0;
    border: none;
    font-weight: 600 !important;
    font-size: 1.125rem !important;
    transition: color 0.15s ease;
    text-decoration: none;
    display: inline-block;
}

.navbar-custom .btn-signin:hover {
    background: none;
    color: #111827 !important;
}

.navbar-custom .text-warning {
    color: #f59e0b !important;
}

.navbar-custom .dropdown-menu {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 0.5rem 0;
    min-width: 280px;
    margin-top: 0.5rem;
}

.navbar-custom .dropdown-item {
    color: #6b7280;
    font-size: 0.875rem;
    padding: 1rem 1.5rem;
    font-weight: 500;
    border: none;
    background: none;
    line-height: 1.4;
}

.navbar-custom .dropdown-item strong {
    color: #111827;
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.25rem;
}

.navbar-custom .dropdown-item small {
    color: #9ca3af;
    font-size: 0.8rem;
    line-height: 1.3;
}

.navbar-custom .dropdown-item:hover {
    background-color: #f9fafb;
    color: #6b7280;
}

.navbar-custom .dropdown-item:hover strong {
    color: #111827;
}

/* Clean Tools Dropdown Styling */
.tools-dropdown .tools-toggle {
    font-weight: 400 !important;
    font-size: 1rem !important;
    color: #6b7280 !important;
    padding: 0.75rem 0 !important;
}

.tools-dropdown .tools-toggle:hover {
    color: #111827 !important;
}

.tools-menu {
    min-width: 200px !important;
    border-radius: 8px !important;
    padding: 0.5rem 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e5e7eb !important;
    margin-top: 0.25rem !important;
}

.tools-header .dropdown-header {
    padding: 0.5rem 1rem !important;
    font-weight: 500 !important;
    color: #9ca3af !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 0 !important;
}

.tool-item {
    display: flex !important;
    align-items: center !important;
    padding: 0.5rem 1rem !important;
    text-decoration: none !important;
    color: #374151 !important;
    transition: background-color 0.15s ease !important;
    border-radius: 0 !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
}

.tool-item:hover {
    background-color: #f9fafb !important;
    color: #111827 !important;
}

.tool-item i {
    color: #6b7280;
    font-size: 0.875rem;
}

.tool-item:hover i {
    color: #374151;
}

.navbar-custom .dropdown-toggle::after {
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    margin-left: 0.5rem;
}

/* Mobile navbar adjustments */
@media (max-width: 991px) {
    .navbar-custom .navbar-collapse {
        border-top: 1px solid #e5e7eb;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }
    
    .navbar-custom .navbar-brand {
        font-size: 1.75rem;
        font-weight: 700;
    }
    
    .navbar-custom .nav-link {
        font-size: 1.125rem;
        font-weight: 600;
        margin: 0 1rem;
        padding: 0.75rem 0 !important;
    }
    
    .navbar-custom .btn-signin {
        font-size: 1.125rem !important;
        font-weight: 600 !important;
        padding: 0.75rem 0;
        background: none;
        color: #6b7280 !important;
    }
    
    /* Mobile tools menu adjustments */
    .tools-menu {
        min-width: 180px !important;
        max-width: 90vw !important;
    }
    
    .tool-item {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    /* Even more compact typography */
    .display-4 {
        font-size: 1.75rem !important;
    }

    .display-5 {
        font-size: 1.35rem !important;
    }

    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.35rem !important;
    }

    /* Tighter spacing */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Navbar brand smaller */
    .navbar-custom .navbar-brand {
        font-size: 1.5rem !important;
    }

    /* Compact buttons */
    .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.25rem;
    }

    /* Compact nav links */
    .navbar-custom .nav-link {
        font-size: 1rem !important;
        padding: 0.5rem 0 !important;
    }
}
/* Navbar User Avatar */
.navbar-user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

@media (max-width: 991px) {
    .navbar-user-avatar {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}
