/* Panel toggle buttons */
        #toggle-left-panel, #toggle-right-panel {
            transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: visible;
            background: transparent !important;
        }

        #toggle-left-panel:hover, #toggle-right-panel:hover {
            background: transparent !important;
            filter: none !important;
        }

        #toggle-left-panel i, #toggle-right-panel i {
            transition: color 0.3s ease;
            display: inline-block;
        }

        /* Keyframes for left arrow animation */
        @keyframes slideLeft {
            0%, 100% {
                transform: translateX(0);
            }
            50% {
                transform: translateX(-4px);
            }
        }

        /* Keyframes for right arrow animation */
        @keyframes slideRight {
            0%, 100% {
                transform: translateX(0);
            }
            50% {
                transform: translateX(4px);
            }
        }

        #toggle-left-panel:hover i {
            color: #8b5cf6;
            animation: slideLeft 0.6s ease-in-out infinite;
        }

        #toggle-right-panel:hover i {
            color: #8b5cf6;
            animation: slideRight 0.6s ease-in-out infinite;
        }

        #toggle-left-panel:active, #toggle-right-panel:active {
            transform: scale(0.95);
        }

        #toggle-left-panel:active i, #toggle-right-panel:active i {
            animation: none;
        }

        /* Drawer splitters */
        #settings-drawer-splitter,
        #job-drawer-splitter,
        #interview-drawer-splitter {
            background: var(--bg-splitter);
            transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        #settings-drawer-splitter:hover,
        #job-drawer-splitter:hover,
        #interview-drawer-splitter:hover {
            background: var(--bg-splitter-hover);
        }

        #settings-drawer-splitter:active,
        #job-drawer-splitter:active,
        #interview-drawer-splitter:active {
            background: var(--bg-splitter-active);
            box-shadow: 0 0 25px rgba(37, 99, 235, 0.4);
        }

        /* Version controls pinned at top of center pane */
        #version-controls {
            flex-shrink: 0;
            width: 100%;
            backdrop-filter: blur(10px);
            background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(249, 250, 251, 1));
            z-index: 30;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            transition: background 0.3s ease;
        }

        [data-theme="dark"] #version-controls {
            background: linear-gradient(to bottom, rgba(31, 41, 55, 1), rgba(17, 24, 39, 1));
        }

        #version-info {
            cursor: pointer;
        }

        #version-info:hover {
            color: var(--text-primary);
        }

        /* Template controls pinned at bottom of center pane */
        #template-controls {
            flex-shrink: 0;
            width: 100%;
            backdrop-filter: blur(10px);
            background: var(--bg-version-controls);
            z-index: 30;
            box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1), 0 -2px 4px -1px rgba(0, 0, 0, 0.06);
            transition: background 0.3s ease;
        }

        /* Template gallery container */
        #template-gallery {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex: 1;
            justify-content: center;
            max-width: 100%;
        }

        /* Template buttons container - horizontal scroll */
        #template-buttons-container {
            display: flex;
            gap: 0.5rem;
            overflow-x: auto;
            scroll-behavior: smooth;
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none; /* IE/Edge */
            padding: 0 0.5rem;
            max-width: calc(100% - 80px); /* Leave space for arrows */
        }

        #template-buttons-container::-webkit-scrollbar {
            display: none; /* Chrome/Safari */
        }

        /* Template button styles */
        .template-btn {
            flex-shrink: 0;
            position: relative;
            overflow: hidden;
            white-space: nowrap;
        }

        .template-btn:hover {
            box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
        }

        .template-btn.active::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, #8b5cf6 0%, #a855f7 100%);
        }

        .template-btn.active {
            border: 2px solid #8b5cf6;
            box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
        }

        /* Gallery navigation arrows */
        .gallery-nav {
            flex-shrink: 0;
            background: var(--bg-input);
            border: 1px solid var(--border-input);
            color: var(--text-primary);
            border-radius: 50%;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: var(--shadow-element);
        }

        .gallery-nav:hover {
            background: var(--bg-input-hover);
            border-color: #8b5cf6;
            color: #8b5cf6;
            box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
            transform: scale(1.05);
        }

        .gallery-nav:active {
            transform: scale(0.95);
        }

        .gallery-nav.disabled {
            opacity: 0.3;
            cursor: not-allowed;
            pointer-events: none;
        }
        
        /* Enhanced transitions for inputs */
        input:not([type="checkbox"]):not([type="radio"]),
        textarea {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border: 1px solid var(--border-input) !important;
            box-shadow: var(--shadow-element);
            background: var(--bg-input);
            color: var(--text-primary) !important;
            cursor: text !important;
            border-radius: 8px;
            backdrop-filter: blur(2px);
        }

        /* Placeholder text color */
        input::placeholder,
        textarea::placeholder {
            color: var(--text-muted);
            opacity: 0.7;
        }

        /* For checkbox and radio - pointer cursor */
        input[type="checkbox"],
        input[type="checkbox"]:hover,
        input[type="radio"],
        input[type="radio"]:hover {
            cursor: pointer !important;
        }

        /* File input also pointer */
        input[type="file"],
        input[type="file"]:hover {
            cursor: pointer !important;
        }

        input:hover, textarea:hover {
            border-color: var(--border-input-hover) !important;
            background: var(--bg-input-hover);
        }

        input:focus, textarea:focus {
            outline: none;
            border-color: var(--border-input-focus) !important;
            background: var(--bg-input-focus);
        }

        /* Enhanced select elements */
        select {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border: 1px solid var(--border-input) !important;
            box-shadow: var(--shadow-element);
            background: var(--bg-input);
            color: var(--text-primary) !important;
            border-radius: 8px;
            backdrop-filter: blur(2px);
        }

        select:hover {
            border-color: var(--border-input-hover) !important;
            background: var(--bg-input-hover);
        }

        select:focus {
            outline: none;
            border-color: var(--border-input-focus) !important;
            background: var(--bg-input-focus);
        }

        /* Option elements inside select */
        select option {
            background: var(--bg-input);
            color: var(--text-primary);
        }
        
        /* Enhanced hover effects for all buttons */
        button {
            position: relative;
            overflow: hidden;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        filter 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            transform-style: preserve-3d;
            cursor: pointer !important;
            backdrop-filter: blur(2px);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        button:hover {
            filter: brightness(1.05) saturate(1.1);
        }

        button:active {
            filter: brightness(0.95);
        }

        /* Enhanced ripple effect on click */
        button::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
            transform: translate(-50%, -50%);
            transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), height 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease;
            pointer-events: none;
            opacity: 0;
        }

        button:active::before {
            width: 400px;
            height: 400px;
            opacity: 1;
        }

        /* Gradient buttons - additional hover effect */
        button[class*="gradient"] {
            background-size: 200% auto;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-position 0.5s ease;
        }

        button[class*="gradient"]:hover {
            background-position: right center;
            filter: brightness(1.1) saturate(1.2);
        }

        /* Glowing effect for main buttons */
        button[class*="bg-blue-"],
        button[class*="bg-green-"],
        button[class*="bg-indigo-"],
        button[class*="bg-purple-"],
        button[class*="bg-red-"] {
            position: relative;
        }

        button[class*="bg-blue-"]:hover,
        button[class*="bg-green-"]:hover,
        button[class*="bg-indigo-"]:hover,
        button[class*="bg-purple-"]:hover,
        button[class*="bg-red-"]:hover {
            filter: brightness(1.15) saturate(1.2);
        }

        /* Tab hover effects */
        .job-tab,
        .interview-tab {
            position: relative;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            background: linear-gradient(145deg, transparent 0%, transparent 100%);
            overflow: hidden;
            border-radius: 8px 8px 0 0;
            margin: 0 2px;
        }

        .job-tab::before,
        .interview-tab::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
            opacity: 0;
            transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: -1;
            border-radius: 8px 8px 0 0;
        }

        .interview-tab::before {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
        }

        .job-tab:hover {
            background: linear-gradient(145deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
            color: #059669;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
            border-radius: 8px 8px 0 0;
            border-color: transparent !important;
        }

        .interview-tab:hover {
            background: linear-gradient(145deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
            color: #6366f1;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
            border-radius: 8px 8px 0 0;
            border-color: transparent !important;
        }

        .job-tab:hover::before,
        .interview-tab:hover::before {
            opacity: 1;
        }

        /* Active tab styles - only bottom border */
        .job-tab.border-green-600,
        .interview-tab.border-indigo-600 {
            background: linear-gradient(145deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
            border-radius: 8px 8px 0 0;
            border-color: transparent !important;
            border-bottom: 2px solid #059669 !important;
        }

        .interview-tab.border-indigo-600 {
            background: linear-gradient(145deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
            border-bottom: 2px solid #6366f1 !important;
        }

        /* Active tab hover effects */
        .job-tab.border-green-600:hover {
            box-shadow: 0 6px 20px rgba(34, 197, 94, 0.25);
            border-bottom: 2px solid #059669 !important;
        }

        .interview-tab.border-indigo-600:hover {
            box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
            border-bottom: 2px solid #6366f1 !important;
        }

        /* Settings drawer tab hover effects */
        .drawer-tab {
            position: relative;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            background: linear-gradient(145deg, transparent 0%, transparent 100%);
            overflow: hidden;
            border-radius: 8px 8px 0 0;
            margin: 0 2px;
        }

        .drawer-tab::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(37, 99, 235, 0.05) 100%);
            opacity: 0;
            transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: -1;
            border-radius: 8px 8px 0 0;
        }

        .drawer-tab:hover {
            background: linear-gradient(145deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
            color: #3b82f6;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
            border-radius: 8px 8px 0 0;
            border-color: transparent !important;
        }

        .drawer-tab:hover::before {
            opacity: 1;
        }

        /* Active settings tab styles - only bottom border */
        .drawer-tab.active {
            background: linear-gradient(145deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
            border-radius: 8px 8px 0 0;
            border-color: transparent !important;
            border-bottom: 2px solid #3b82f6 !important;
        }

        .drawer-tab.active:hover {
            box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
            border-bottom: 2px solid #3b82f6 !important;
        }

        /* Effect for buttons with icons */
        button i {
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            pointer-events: none; /* Icons do not intercept events */
        }

        button:hover i {
            transform: scale(1);
        }

        /* All elements inside buttons do not intercept events */
        button * {
            pointer-events: none;
        }

        /* Effect for disabled buttons - remove hover effects */
        button:disabled,
        button[disabled] {
            transform: none !important;
            box-shadow: none !important;
            filter: none !important;
            cursor: not-allowed !important;
            opacity: 0.6;
        }

        button:disabled:hover,
        button[disabled]:hover {
            transform: none !important;
            box-shadow: none !important;
        }

        /* Special effects for round buttons */
        button[class*="rounded-full"] {
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        button[class*="rounded-full"]:hover {
            transform: rotate(180deg);
            filter: brightness(1.1) saturate(1.2);
        }

        /* Enhanced effect for accordion buttons */
        .accordion-toggle {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border-radius: 8px;
            backdrop-filter: blur(2px);
        }

        .accordion-toggle:hover {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
        }
        
        /* Base drawer styles - common for all screens */
        .drawer {
            position: fixed;
            overflow-y: auto;
            transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                        box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                        opacity 0.3s ease-in-out;
            z-index: 40;
            will-change: transform, box-shadow, opacity;
        }

        /* Enhanced overlay for drawer with blur effect */
        .drawer-open::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            z-index: 40; /* Higher than toolbar (z-index: 50) but lower than drawers (z-index: 40+) */
            opacity: 0;
            transition: opacity 0.3s ease-in-out;
        }

        /* No blur for settings drawer - we want to see preview changes */
        .drawer-open.settings-drawer-open::before {
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            background: rgba(0, 0, 0, 0.1);
            z-index: 40; /* Same as regular overlay */
        }

        .drawer-open.show-overlay::before {
            opacity: 1;
        }

        /* Drawer shadow effects */
        .drawer:not(.translate-x-full) {
            box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15),
                        -8px 0 40px rgba(0, 0, 0, 0.08);
            z-index: 41; /* Higher than overlay (z-index: 40) */
        }

        .drawer.translate-x-full {
            box-shadow: none;
        }

        /* Smooth entrance animation */
        @keyframes drawerSlideIn {
            0% {
                transform: translateX(100%);
                opacity: 0;
            }
            50% {
                opacity: 1;
            }
            100% {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes drawerSlideOut {
            0% {
                transform: translateX(0);
                opacity: 1;
            }
            50% {
                opacity: 1;
            }
            100% {
                transform: translateX(100%);
                opacity: 0;
            }
        }

        /* Animation classes for programmatic control */
        .drawer.slide-in {
            animation: drawerSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
        }

        .drawer.slide-out {
            animation: drawerSlideOut 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
        }

        /* Modal scale-in animation */
        @keyframes scaleIn {
            0% {
                transform: scale(0.7);
                opacity: 0;
            }
            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        .animate-scale-in {
            animation: scaleIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
        }
