﻿
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: linear-gradient(135deg, #1A2F5B 0%, #3B5B8F 100%);
            min-height: 100vh;
            color: #1A2F5B;
        }
        
        .hidden { display: none !important; }
        
        .container {
            max-width: 400px;
            margin: 0 auto;
            padding: 20px;
        }
        
        .card {
            background: white;
            border-radius: 12px;
            padding: 40px;
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            text-align: center;
        }
        
        .logo {
            font-size: 2.5rem;
            font-weight: bold;
            color: #4f46e5;
            margin-bottom: 10px;
        }
        
        .subtitle {
            color: #374151;
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 16px;
        }
        
        .form-group {
            margin-bottom: 20px;
            text-align: left;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #1A2F5B;
            font-weight: 600;
            font-size: 16px;
        }
        
        .form-group input {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            font-size: 16px;
            transition: all 0.2s;
            background: #f8fafc;
        }
        
        .form-group input:focus {
            outline: none;
            border-color: #4f46e5;
            background: white;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }
        
        .btn {
            width: 100%;
            padding: 12px;
            background: #4f46e5;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        
        .btn:hover {
            background: #4338ca;
        }
        
        .btn:disabled {
            background: #9ca3af;
            cursor: not-allowed;
        }
        
        /* OAuth Styles */
        .oauth-section {
            margin-bottom: 20px;
        }
        
        .oauth-btn {
            width: 100%;
            padding: 12px;
            margin-bottom: 10px;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            background: white;
        }
        
        .oauth-btn i {
            font-size: 18px;
        }
        
        .oauth-btn:hover {
            border-color: #d1d5db;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .google-btn {
            color: #db4437;
        }
        
        .google-btn:hover {
            background: #fef2f2;
        }
        
        .divider {
            display: flex;
            align-items: center;
            text-align: center;
            margin: 25px 0;
        }
        
        .divider::before,
        .divider::after {
            content: '';
            flex: 1;
            border-bottom: 1px solid #e5e7eb;
        }
        
        .divider span {
            padding: 0 15px;
            color: #6b7280;
            font-size: 14px;
        }
        
        .loading {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid #f3f3f3;
            border-top: 3px solid #4f46e5;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .error {
            background: #fef2f2;
            color: #dc2626;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 20px;
            border: 1px solid #fecaca;
        }
        
        .success {
            background: #f0fdf4;
            color: #16a34a;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 20px;
            border: 1px solid #bbf7d0;
        }
        
        .warning {
            background: #fef3c7;
            color: #d97706;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 20px;
            border: 1px solid #fde68a;
        }
        
        .dashboard {
            background: white;
            min-height: 100vh;
            padding: 20px;
        }
        
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 40px;
            padding-bottom: 20px;
            border-bottom: 1px solid #e5e7eb;
        }
        
        .welcome {
            text-align: center;
            padding: 60px 20px;
        }
        
        .welcome h1 {
            font-size: 2.5rem;
            color: #1A2F5B;
            margin-bottom: 10px;
        }
        
        .welcome p {
            color: #6b7280;
            font-size: 1.1rem;
        }

        /* Main App Layout */
        .app-layout {
            display: grid;
            grid-template-columns: 280px 900px 400px;
            height: 100vh;
            background: #f8fafc;
            gap: 0;
            width: 1580px;
            margin: 0 auto;
        }

        .sidebar {
            grid-column: 1;
            background: white;
            border-right: 1px solid #e2e8f0;
            display: flex;
            flex-direction: column;
            width: 280px;
            min-width: 280px;
            height: 100vh;
        }

        .main-content {
            grid-column: 2;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            width: 900px;
            min-width: 900px;
            max-width: 900px;
            padding: 0 20px;
        }

        .preview-panel {
            grid-column: 3;
            background: white;
            border-left: 1px solid #e2e8f0;
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
        }

        /* Sidebar */

        .sidebar-header {
            padding: 12px;
            width: 100%;
            min-height: auto;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .logo-section {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            width: 100%;
        }

        .logo-section .logo {
            font-size: 2rem;
        }

        .logo-section h1 {
            font-size: 1.5rem;
            font-weight: bold;
            color: #1e293b;
            margin: 0;
        }

        .logo-section small {
            color: #64748b;
            font-size: 0.875rem;
        }

        .sidebar-content {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
        }

        .sidebar-footer {
            padding: 12px 20px;
            border-top: 1px solid #e2e8f0;
            text-align: center;
            flex-shrink: 0;
        }

        .sidebar-footer-text {
            font-size: 0.75rem;
            color: #9ca3af;
            margin: 0;
        }

        .section {
            margin-bottom: 24px;
            background: white;
            border-radius: 12px;
            border: 1px solid #e2e8f0;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .section h3 {
            padding: 10px 20px;
            margin: 0;
            font-size: 1rem;
            font-weight: 600;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            border-bottom: none;
            background: #f8fafc;
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px;
            background: #f8fafc;
            border-bottom: 1px solid #e2e8f0;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .section-header:hover {
            background: #f1f5f9;
        }

        .section-header:hover h3 {
            background: #f1f5f9;
        }

        .section-header h3 {
            font-size: 1.125rem;
            font-weight: 600;
            color: #1A2F5B;
            margin: 0;
            text-transform: none;
            letter-spacing: normal;
            transition: background-color 0.2s ease;
        }

        .section-chevron {
            width: 20px;
            height: 20px;
            transition: transform 0.2s ease;
            color: #64748b;
        }

        .section-chevron.collapsed {
            transform: rotate(-90deg);
        }

        .section-content {
            padding: 20px;
            transition: all 0.3s ease;
        }

        .section-content.collapsed {
            display: none;
        }

        .collections {
            margin-bottom: 12px;
        }

        .collection-item {
            padding: 10px 20px;
            border-radius: 0;
            cursor: pointer;
            transition: all 0.2s;
            margin-bottom: 0;
            border: none;
            background: transparent;
            position: relative;
        }

        .collection-item:not(:first-child)::before {
            content: '';
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 66.67%;
            height: 1px;
            background: #e5e7eb;
        }

        .collection-item:hover {
            background: #f8fafc;
        }

        .collection-item.active {
            background: #1A2F5B;
            color: white;
        }

        .collection-item.active + .collection-item {
            border-top-color: #1A2F5B;
        }

        .collection-header {
            display: flex;
            justify-content: flex-start;
            align-items: flex-start;
            margin-bottom: 4px;
        }

        .collection-drag-handle {
            cursor: grab;
            color: #94a3b8;
            margin-right: 2px;
            padding: 0;
            display: flex;
            align-items: center;
            opacity: 0;
            transition: opacity 0.2s;
            font-size: 0.65rem;
            flex-shrink: 0;
            width: 12px;
        }

        .collection-drag-handle:active {
            cursor: grabbing;
        }

        .collection-item:hover .collection-drag-handle {
            opacity: 1;
        }

        .collection-item.active .collection-drag-handle {
            opacity: 1;
            color: rgba(255, 255, 255, 0.7);
        }

        .collection-item.dragging {
            opacity: 0.5;
            cursor: grabbing;
        }

        .collection-header .collection-name {
            flex: 1;
            min-width: 0;
        }

        .collection-name {
            font-weight: 500;
            font-size: 1rem;
            color: #1A2F5B;
            word-break: break-word;
            overflow-wrap: break-word;
            white-space: normal;
            line-height: 1.4;
        }

        .collection-item.active .collection-name {
            color: white;
        }

        .collection-title {
            display: block;
            word-break: break-word;
            overflow-wrap: break-word;
            white-space: normal;
            margin-bottom: 2px;
        }

        .collection-conference {
            display: block;
            word-break: break-word;
            overflow-wrap: break-word;
            white-space: normal;
            font-size: 1rem;
            color: #64748b;
        }

        .collection-item.active .collection-conference {
            color: rgba(255, 255, 255, 0.8);
        }

        .collection-item:hover .collection-actions {
            opacity: 1;
        }

        .collection-item.active .collection-actions {
            opacity: 1;
        }

        .collection-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.75rem;
            color: #64748b;
            margin-top: 2px;
            gap: 8px;
        }

        .collection-visibility {
            flex-shrink: 0;
        }

        .collection-visibility .fa-globe,
        .collection-visibility .fa-lock,
        .collection-visibility .fa-key {
            color: #1A2F5B;
        }

        .collection-item.active .collection-visibility .fa-globe,
        .collection-item.active .collection-visibility .fa-lock,
        .collection-item.active .collection-visibility .fa-key {
            color: #9ca3af;
        }

        .collection-actions {
            display: flex;
            gap: 8px;
            opacity: 0;
            transition: opacity 0.2s;
            flex-shrink: 0;
        }

        .collection-actions .btn-icon {
            background: none !important;
            border: none !important;
            padding: 6px 8px !important;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px !important;
            transition: background-color 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 32px !important;
            min-height: 32px !important;
            width: auto !important;
            height: auto !important;
            line-height: 1;
            color: #1A2F5B;
            box-shadow: none !important;
        }

        .collection-actions .btn-icon:hover {
            background: rgba(0, 0, 0, 0.1) !important;
        }

        .collection-item.active .collection-actions .btn-icon {
            color: #9ca3af;
        }

        .collection-item.active .collection-actions .btn-icon:hover {
            background: rgba(255, 255, 255, 0.2) !important;
        }

        .collection-links {
            flex-shrink: 0;
            white-space: nowrap;
            margin-left: auto;
        }

        .collection-item.active .collection-info {
            color: rgba(255, 255, 255, 0.9);
        }

        .btn-new-collection {
            width: 100%;
            padding: 10px 20px;
            margin: 0;
            border-radius: 0;
            background: #f8fafc;
            border: none;
            border-top: 1px solid #e2e8f0;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 600;
            font-size: 1rem;
            color: #64748b;
            text-align: left;
            position: relative;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .btn-new-collection::before {
            content: '+';
            margin-right: 8px;
            font-size: 0.9rem;
            font-weight: 700;
        }

        .btn-new-collection:hover {
            background: #1A2F5B;
            color: white;
            box-shadow: 0 2px 4px rgba(26, 47, 91, 0.3);
        }

        .btn-new-collection:active {
            background: #152547;
        }

        .collection-status {
            font-size: 11px;
            font-weight: 600;
            color: #10b981;
            margin-top: 4px;
        }

        .collection-item.active .collection-status {
            color: #a7f3d0;
        }

        .btn-icon {
            background: none;
            border: none;
            padding: 6px 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px !important;
            transition: background-color 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 32px;
            min-height: 32px;
            line-height: 1;
            color: #1A2F5B;
        }

        .btn-icon:hover {
            background: rgba(0, 0, 0, 0.1);
        }
        
        .btn-icon .fa-copy,
        .btn-icon i.fa-copy {
            color: #1A2F5B;
        }

        .collection-item.active .btn-icon {
            color: #9ca3af;
        }

        .collection-item.active .btn-icon:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        /* Trash icons should be brand color */
        .fa-trash,
        button .fa-trash,
        .btn-icon .fa-trash,
        .btn-ghost .fa-trash {
            color: #1A2F5B !important;
        }

        /* Exception: Selected collection trash icon should be light gray */
        .collection-item.active .fa-trash,
        .collection-item.active button .fa-trash,
        .collection-item.active .btn-icon .fa-trash {
            color: #9ca3af !important;
        }

        .form-help {
            font-size: 12px;
            color: #6b7280;
            margin-top: 4px;
            display: block;
        }

        .modal-actions {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid #e5e7eb;
        }

        .modal-actions .btn {
            min-height: 40px;
            height: 40px;
            padding: 10px 40px;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            white-space: nowrap;
            min-width: 120px;
        }

        .modal-actions .btn * {
            display: inline;
            vertical-align: middle;
        }

        .nav-items {
            display: flex;
            flex-direction: column;
            gap: 2px;
            padding: 8px 0;
        }
        .profile-info-section {
            margin-bottom: 16px;
        }

        .profile-info-section .form-group {
            margin-bottom: 12px;
        }

        .profile-info-section .form-group:last-child {
            margin-bottom: 0;
        }

        /* Profile Modal Styling */
        #profileModal .modal-body {
            width: 900px !important;
            max-width: 900px !important;
            min-width: 600px;
            max-height: 80vh;
            border-radius: 12px !important;
            overflow-y: auto;
            position: relative;
            background: white;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            padding: 20px;
        }
        
        @media (max-width: 950px) {
            #profileModal .modal-body {
                width: 90vw !important;
                max-width: 90vw !important;
                min-width: auto;
            }
        }
        
        #profileModal .profile-modal-close {
            position: absolute;
            top: 20px;
            right: 20px;
            background: transparent;
            border: none;
            font-size: 28px;
            color: #64748b;
            cursor: pointer;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: all 0.2s;
            z-index: 10;
            padding: 0;
            line-height: 1;
        }
        
        #profileModal .profile-modal-close:hover {
            background: #f1f5f9;
            color: #1e293b;
        }
        
        /* Profile Photo Edit Modal Close Icon */
        #profilePhotoEditModal .modal-body {
            position: relative;
        }
        
        #profilePhotoEditModal .profile-photo-edit-close {
            position: absolute;
            top: 20px;
            right: 20px;
            background: transparent;
            border: none;
            font-size: 28px;
            color: #64748b;
            cursor: pointer;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: all 0.2s;
            z-index: 10;
            padding: 0;
            line-height: 1;
        }
        
        #profilePhotoEditModal .profile-photo-edit-close:hover {
            background: #f1f5f9;
            color: #1e293b;
        }

        #profileModal .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #1A2F5B;
            font-weight: 600;
            font-size: 16px;
        }
        
        #profileModal .card {
            margin-bottom: 20px;
        }

        #profileModal .card:last-child {
            margin-bottom: 0;
        }

        #profileModal .rtf-editor {
            margin-top: 8px;
        }

        #profileModal .btn-lg {
            padding: 12px 24px;
            font-size: 16px;
        }
        
        /* Profile Photo Section Layout */
        #profileModal #profileAvatar {
            width: 100%;
        }
        
        #profileModal #profileAvatar::file-selector-button {
            background: #1A2F5B;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 600;
            margin-right: 12px;
            transition: background-color 0.2s;
        }
        
        #profileModal #profileAvatar::file-selector-button:hover {
            background: #152547;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 8px 20px;
            border: none;
            background: none;
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.2s;
            text-align: left;
            font-size: 1rem;
            color: #64748b;
        }

        .nav-item:hover {
            background: #f1f5f9;
        }

        /* Main Content */

        /* Sleek Modern Header Design */
        .content-header-new {
            padding: 12px 24px;
            background: white;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .collection-header-main {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            max-width: 100%;
        }

        .collection-name-input {
            font-size: 18px;
            font-weight: 600;
            color: #1A2F5B;
            border: none;
            background: transparent;
            padding: 6px 0;
            border-radius: 4px;
            flex: 1;
            min-width: 0;
            transition: all 0.2s ease;
        }

        .collection-name-input::placeholder {
            color: #9ca3af;
            font-weight: 400;
        }

        .collection-name-input:hover {
            background: #f9fafb;
            padding: 6px 8px;
        }

        .collection-name-input:focus {
            outline: none;
            background: white;
            padding: 6px 8px;
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 20px;
            flex-shrink: 0;
        }

        .visibility-control-group {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .visibility-label-text {
            font-size: 14px;
            font-weight: 500;
            color: #64748b;
            white-space: nowrap;
            margin: 0;
        }

        .visibility-select-compact {
            padding: 8px 14px;
            border: 1.5px solid #d1d5db;
            border-radius: 6px;
            background: white;
            font-size: 14px;
            font-weight: 600;
            color: #1A2F5B;
            cursor: pointer;
            min-width: 140px;
            height: 38px;
            transition: all 0.15s ease;
            line-height: 1.4;
            white-space: nowrap;
            overflow: visible;
        }

        .visibility-select-compact:hover {
            border-color: #9ca3af;
            background: #f9fafb;
        }

        .visibility-select-compact:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .passkey-controls-compact {
            display: flex;
            align-items: center;
        }

        .passkey-input-compact {
            padding: 8px 14px;
            border: 1.5px solid #d1d5db;
            border-radius: 6px;
            background: white;
            font-size: 14px;
            font-weight: 600;
            color: #1f2937;
            min-width: 120px;
            height: 38px;
            transition: all 0.15s ease;
            line-height: 1.4;
            white-space: nowrap;
            overflow: visible;
        }

        .passkey-input-compact:hover {
            border-color: #9ca3af;
        }

        .passkey-input-compact:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .btn-save-compact {
            padding: 8px 20px;
            font-size: 16px;
            font-weight: 600;
            border-radius: 6px;
            transition: all 0.15s ease;
            line-height: 1.4;
            letter-spacing: 0.01em;
            height: 38px;
            white-space: nowrap;
            overflow: visible;
        }

        /* Narrower buttons for gradient controls */
        .favorites-controls .btn-save-compact,
        .gradient-stops .btn-save-compact {
            padding: 8px 12px;
            min-width: auto;
            width: auto;
        }

        /* Center text in Copy buttons */
        #gradient-copy-btn,
        #border-gradient-copy-btn {
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Legacy styles kept for compatibility - HIDDEN */
        .content-header {
            display: none !important;
            visibility: hidden !important;
            height: 0 !important;
            padding: 0 !important;
            margin: 0 !important;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            flex: 1;
            min-width: 0;
        }
        
        .logo-section {
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 200px;
            width: 100%;
        }
        
        .logo-section img {
            height: 250px !important;
            width: auto !important;
            max-height: 250px !important;
            min-height: 250px !important;
            flex-shrink: 0 !important;
            flex-grow: 0 !important;
            object-fit: contain !important;
            transition: transform 0.2s ease;
            display: block !important;
            margin: 0 auto !important;
        }
        
        .logo-section img:hover {
            transform: scale(1.05);
        }
        
        #sidebar-logo {
            height: 250px !important;
            width: auto !important;
            max-height: 250px !important;
            min-height: 250px !important;
            flex-shrink: 0 !important;
            flex-grow: 0 !important;
            object-fit: contain !important;
            display: block !important;
            margin: 0 auto !important;
        }

        .visibility-controls {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .visibility-label {
            font-size: 14px;
            font-weight: 500;
            color: #64748b;
            margin: 0;
        }

        .visibility-select {
            padding: 6px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            background: white;
            font-size: 14px;
            color: #374151;
            cursor: pointer;
            min-width: 120px;
        }

        .visibility-select:hover {
            border-color: #9ca3af;
        }

        .visibility-select:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .passkey-controls {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .passkey-label {
            font-size: 14px;
            font-weight: 500;
            color: #64748b;
            margin: 0;
        }

        .passkey-input {
            padding: 6px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            background: white;
            font-size: 14px;
            color: #374151;
            min-width: 120px;
        }

        .passkey-input:hover {
            border-color: #9ca3af;
        }

        .passkey-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .project-controls {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .project-label {
            font-size: 14px;
            font-weight: 500;
            color: #64748b;
            margin: 0;
        }

        .project-input {
            padding: 6px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            background: white;
            font-size: 14px;
            color: #374151;
            min-width: 150px;
        }

        .project-input:hover {
            border-color: #9ca3af;
        }

        .project-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .form-group-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            gap: 12px;
        }

        .form-group-header label {
            font-size: 16px !important;
            font-weight: 600;
            color: #374151;
            margin: 0;
        }

        .form-group-header label.required::after {
            content: " *";
            color: #dc2626;
            font-weight: bold;
        }

        .form-input:required:invalid {
            border-color: #dc2626;
            box-shadow: 0 0 0 1px #dc2626;
        }

        .form-input:required:valid {
            border-color: #10b981;
        }

        #presentation-info-content .form-group-header label {
            font-size: 16px !important;
            font-weight: 600;
            color: #374151;
            margin: 0;
        }

        .display-checkbox-label {
            display: flex;
            align-items: baseline;
            font-size: 11px;
            color: #6b7280;
            margin: 0;
            white-space: nowrap;
            gap: 6px;
            min-width: 140px;
            flex-shrink: 0;
            line-height: 1;
        }

        .display-checkbox-label label {
            font-size: 11px;
            color: #6b7280;
            cursor: pointer;
            margin: 0;
            line-height: 1;
        }

        .display-checkbox {
            width: 14px !important;
            height: 14px !important;
            min-width: 14px !important;
            min-height: 14px !important;
            max-width: 14px !important;
            max-height: 14px !important;
            accent-color: #3b82f6;
            cursor: pointer;
            margin: 0;
            flex-shrink: 0;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-shrink: 0;
        }

        /* New Clean Header Design */
        .content-header-new {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 24px;
            background: white;
            gap: 16px;
            margin: 0 -20px 0 -20px;
            width: calc(100% + 40px);
            border-bottom: none;
        }

        .collection-header {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
            min-width: 0;
        }

        .collection-name-input {
            font-size: 20px;
            font-weight: 600;
            color: #1f2937;
            border: none;
            background: transparent;
            padding: 4px 8px;
            border-radius: 6px;
            min-width: 200px;
            flex: 1;
            max-width: 500px;
        }

        .collection-name-input:hover {
            background: #f9fafb;
        }

        .collection-name-input:focus {
            outline: 2px solid #3b82f6;
            outline-offset: 2px;
            background: white;
        }

        .collection-meta {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .visibility-select-compact {
            padding: 8px 14px;
            border: 1.5px solid #d1d5db;
            border-radius: 6px;
            background: white;
            font-size: 14px;
            font-weight: 600;
            color: #1f2937;
            cursor: pointer;
            min-width: 120px;
            transition: all 0.15s ease;
            line-height: 1.4;
        }

        .visibility-select-compact:hover {
            border-color: #9ca3af;
            background: #f9fafb;
        }

        .visibility-select-compact:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .passkey-controls-compact {
            display: flex;
            align-items: center;
        }

        .passkey-input-compact {
            padding: 8px 14px;
            border: 1.5px solid #d1d5db;
            border-radius: 6px;
            background: white;
            font-size: 14px;
            font-weight: 600;
            color: #1f2937;
            min-width: 120px;
            height: 38px;
            transition: all 0.15s ease;
            line-height: 1.4;
            white-space: nowrap;
            overflow: visible;
        }

        .passkey-input-compact:hover {
            border-color: #9ca3af;
        }

        .passkey-input-compact:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .btn-save-sticky {
            flex-shrink: 0;
        }

        .badge {
            background: #f1f5f9;
            color: #475569;
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 500;
        }

        /* Tabs */
        .tabs {
            display: flex;
            background: white;
            border: none;
            border-top: none;
            border-bottom: none;
            border-radius: 0;
            padding: 8px;
            gap: 4px;
            box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1);
            margin: 0 -20px 24px -20px;
            width: calc(100% + 40px);
        }

        .tab {
            padding: 10px 20px;
            border: none;
            background: #f1f5f9;
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.2s;
            font-size: 1rem;
            color: #1A2F5B;
            font-weight: 500;
            position: relative;
            flex: 1;
            text-align: center;
        }

        .tab:hover {
            background: #e2e8f0;
        }

        .tab.active {
            color: #1A2F5B;
            background: white;
            box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
            font-weight: 600;
        }

        .tab.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 60%;
            height: 3px;
            background: #1A2F5B;
            border-radius: 2px 2px 0 0;
        }

        /* Tab Content */
        .tab-content {
            flex: 1;
            overflow-y: auto;
            padding: 24px;
        }

        .tab-panel {
            display: none;
        }

        .tab-panel.active {
            display: block;
        }

        /* Cards */
        .card {
            background: white;
            border-radius: 12px;
            border: 1px solid #e2e8f0;
            overflow: hidden;
        }

        .card-header {
            padding: 20px 24px;
            border-bottom: 1px solid #e2e8f0;
        }

        .card-header h3 {
            font-size: 1.125rem;
            font-weight: 600;
            color: #1A2F5B;
            margin: 0 0 4px 0;
        }

        .card-header p {
            color: #64748b;
            font-size: 0.875rem;
            margin: 0;
        }

        .card-body {
            padding: 24px;
        }

        /* Forms */
        .form-row {
            display: flex;
            gap: 12px;
            margin-bottom: 16px;
        }

        .form-input {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-size: 14px;
        }

        .form-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .form-textarea {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-size: 0.875rem;
            resize: vertical;
            min-height: 80px;
        }

        .form-select {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-size: 0.875rem;
            background: white;
        }

        .form-group {
            margin-bottom: 16px;
        }

        .form-group label {
            display: block;
            font-size: 16px;
            font-weight: 600;
            color: #374151;
            margin-bottom: 8px;
        }

        .checkbox-label {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
        }

        .checkbox-label input[type="checkbox"] {
            margin: 0;
        }

        .char-count {
            font-size: 0.75rem;
            color: #64748b;
            text-align: right;
            margin-top: 4px;
        }

        /* Links List */
        .links-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .link-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 8px 12px;
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            transition: all 0.2s;
            min-height: 56px;
            margin-bottom: 6px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            position: relative;
        }

        .link-item:hover {
            background: #f1f5f9;
            border-color: #cbd5e1;
        }

        .link-item.dragging {
            opacity: 0.7;
            transform: scale(1.02);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }


        .drag-handle {
            cursor: grab;
            color: #1A2F5B;
            font-size: 1.2rem;
            padding: 8px;
            margin: -8px;
            border-radius: 4px;
            transition: background-color 0.2s;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .drag-handle:hover {
            background-color: #f1f5f9;
            color: #152547;
        }

        .drag-handle:active {
            cursor: grabbing;
        }
        .link-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .link-title {
            font-weight: 500;
            color: #1e293b;
            font-size: 16px;
            padding: 6px 10px;
            min-height: 32px;
            border-radius: 4px;
            transition: all 0.2s;
        }

        .link-url {
            color: #64748b;
            font-size: 12px;
            text-decoration: none;
            padding: 4px 10px;
            min-height: 24px;
            border-radius: 3px;
            transition: all 0.2s;
        }

        .link-actions {
            display: flex;
            gap: 4px;
        }

        .btn-sm {
            padding: 4px 8px;
            font-size: 0.75rem;
        }

        /* Appearance */
        .appearance-grid {
            display: flex;
            flex-direction: column;
            gap: 24px;
        }

        .appearance-section {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 20px;
        }

        .appearance-section h3 {
            font-size: 1rem;
            font-weight: 600;
            color: #1e293b;
            margin: 0 0 16px 0;
        }

        .option-group {
            margin-bottom: 16px;
        }

        .option {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 8px;
            cursor: pointer;
        }

        .color-options {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        .color-picker {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        .color-input {
            width: 90px;
            font-family: monospace;
            text-align: center;
        }

        .gradient-options {
            margin-top: 16px;
        }

        .gradient-presets {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin-bottom: 12px;
        }

        .preset {
            height: 40px;
            border-radius: 8px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: border-color 0.2s;
        }

        .preset:hover {
            border-color: #3b82f6;
        }
        
        .color-presets-container {
            display: grid;
            grid-template-columns: repeat(6, 32px);
            gap: 8px;
            margin-bottom: 8px;
            margin-top: 8px;
        }
        
        .color-preset {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }
        
        .color-preset:hover {
            border-color: #3b82f6;
            transform: scale(1.05);
        }
        
        .color-preset.active {
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
        }

        .gradient-input {
            width: 100%;
            font-family: monospace;
            font-size: 0.75rem;
        }

        /* Settings */
        .settings-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
        }

        .settings-section {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 20px;
        }

        .settings-section h3 {
            font-size: 1rem;
            font-weight: 600;
            color: #1e293b;
            margin: 0 0 16px 0;
        }

        /* Analytics */
        .analytics-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }

        .analytics-header h3 {
            font-size: 1.5rem;
            font-weight: 600;
            color: #1e293b;
            margin: 0;
        }

        .date-range {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            margin-bottom: 24px;
        }

        .stat-card {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 20px;
            text-align: center;
        }
        
        /* QR Code Tab Styles */
        .qr-content {
            display: grid;
            grid-template-columns: 350px 1fr;
            gap: 24px;
            padding: 24px;
        }
        
        .qr-settings {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }
        
        .qr-preview {
            display: flex;
            flex-direction: column;
        }
        
        .qr-theme-management-fullwidth {
            grid-column: 1 / span 2;
            width: 100%;
            max-width: 100%;
        }
        
        #qr-actions {
            display: flex;
        }
        
        #qr-actions .btn {
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        
        #qr-code-container canvas,
        #qr-code-container svg {
            max-width: 100%;
            height: auto;
            display: block;
            margin: 0 auto;
        }
        
        #qr-code-container canvas[data-hidden="true"] {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
            pointer-events: none !important;
        }
        

        .stat-number {
            font-size: 2rem;
            font-weight: bold;
            color: #1A2F5B;
            margin-bottom: 4px;
        }

        .stat-label {
            font-size: 0.875rem;
            color: #64748b;
        }

        .chart-container {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 20px;
        }

        /* Preview Panel */

        .preview-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px 16px 48px;
        }

        .preview-header h3 {
            font-size: 1.5rem;
            font-weight: 600;
            color: #1A2F5B;
            margin: 0;
        }

        .preview-controls {
            display: flex;
            gap: 8px;
        }

        .preview-content {
            flex: 1;
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            overflow-y: auto; /* Allow vertical scroll if preview is taller than panel */
            overflow-x: hidden;
        }

        .phone-mockup {
            /* iPhone 15 Pro dimensions: 1179 x 2556 pixels (width x height) */
            /* Usable height: 635px, plus 16px padding (8px top + 8px bottom) = 651px total */
            width: 360px;
            height: 651px; /* 635px usable + 16px padding */
            background: #1e293b;
            border-radius: 24px;
            padding: 8px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            box-sizing: border-box;
            flex-shrink: 0; /* Prevent shrinking */
        }

        .phone-screen {
            width: 100%;
            height: 635px; /* Usable height - scrollbar appears if content extends beyond */
            max-height: 635px; /* Ensure it doesn't exceed this */
            background: #ffffff; /* Default white background */
            border-radius: 16px;
            overflow-y: auto; /* Enable scrolling for content that extends beyond 635px */
            overflow-x: hidden;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            position: relative;
            /* Use -webkit-overflow-scrolling for smooth iOS scrolling */
            -webkit-overflow-scrolling: touch;
        }

        /* Make scrollbar less obvious in live preview */
        .phone-screen::-webkit-scrollbar {
            width: 6px; /* Thinner scrollbar */
        }

        .phone-screen::-webkit-scrollbar-track {
            background: transparent; /* Transparent track */
        }

        .phone-screen::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.2); /* Subtle, semi-transparent thumb */
            border-radius: 3px;
        }

        .phone-screen::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.3); /* Slightly more visible on hover */
        }

        /* Firefox scrollbar styling */
        .phone-screen {
            scrollbar-width: thin; /* Thin scrollbar */
            scrollbar-color: rgba(0, 0, 0, 0.2) transparent; /* Subtle thumb, transparent track */
        }

        .preview-header-content {
            padding: 20px;
            text-align: left;
            border-bottom: 1px solid transparent;
            background: transparent;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }

        .preview-profile-section {
            display: flex;
            align-items: flex-start;
            gap: 16px;
            margin-bottom: 20px;
        }

        .preview-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: #8b5cf6;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            margin: 0;
            border: 2px solid #e5e7eb;
            flex-shrink: 0;
            overflow: hidden;
        }

        .preview-avatar img {
            width: 100% !important;
            height: 100% !important;
            border-radius: 50% !important;
            object-fit: cover !important;
        }

        .preview-name-section {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            flex: 1;
            min-width: 0;
        }

        .preview-name-section h4 {
            font-size: 1.59rem; /* Scaled for iPhone aspect ratio (1.75rem * 0.91) */
            font-weight: 600;
            color: #1A2F5B;
            margin: 0 0 12px 0;
            line-height: 1.2;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

        .preview-header-content p {
            color: #6b7280;
            font-size: 0.95rem;
            margin: 0 0 20px 0;
            line-height: 1.4;
        }

        .preview-social {
            display: flex;
            gap: 5.5px; /* Scaled for iPhone aspect ratio (6px * 0.91) */
            margin: 0;
            justify-content: flex-start;
            flex-wrap: wrap;
        }

        .social-icon {
            width: 25.5px; /* Scaled for iPhone aspect ratio (28px * 0.91) */
            height: 25.5px; /* Scaled for iPhone aspect ratio (28px * 0.91) */
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            font-size: 12.7px; /* Scaled for iPhone aspect ratio (14px * 0.91) */
            transition: transform 0.2s;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }
        
        .social-icon i {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .social-icon:hover {
            transform: scale(1.05);
        }

        .social-icon.instagram {
            background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
            color: white;
        }

        .social-icon.facebook {
            background: #1877f2;
            color: white;
        }

        .social-icon.twitter {
            background: #000000;
            color: white;
        }

        .social-icon.linkedin {
            background: #0077b5;
            color: white;
        }

        .social-icon.email {
            background: #ea4335;
            color: white;
        }

        .social-icon.youtube {
            background: #ff0000;
            color: white;
        }

        .social-icon.tiktok {
            background: #000000;
            color: white;
        }

        .social-icon.snapchat {
            background: #fffc00;
            color: #000000;
        }

        .preview-dynamic-info {
            margin: 0 0 16px 0;
            padding: 0;
            display: none; /* Hidden by default, shown when fields are visible */
        }

        .info-field {
            margin: 0 0 4px 0;
            font-size: 0.9rem;
            line-height: 1.3;
            color: #374151;
        }

        .info-label {
            display: none;
        }

        .info-value {
            /* Color will be set by JavaScript from theme - no default to avoid conflicts */
            font-weight: 600; /* Bold presentation information */
            font-size: 1.02rem; /* Scaled for iPhone aspect ratio (1.125rem * 0.91) */
        }

        .profile-info-section {
            margin: 20px 0;
            padding: 20px;
            background: #f8fafc;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
        }

        .presentation-info-section,
        .add-link-section,
        .links-section {
            margin: 24px 0;
        }

        .presentation-info-section .card,
        .add-link-section .card,
        .links-section .card {
            background: white;
            border-radius: 12px;
            padding: 0;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }

        .profile-info-section h3 {
            margin: 0 0 16px 0;
            color: #1e293b;
            font-size: 1.125rem;
            font-weight: 600;
            padding-bottom: 8px;
            border-bottom: 2px solid #e5e7eb;
        }
        .presentation-info-section .card-header,
        .add-link-section .card-header,
        .links-section .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 24px;
            background: #f8fafc;
            border-bottom: 1px solid #e2e8f0;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .presentation-info-section .card-header:hover,
        .add-link-section .card-header:hover,
        .links-section .card-header:hover {
            background: #f1f5f9;
        }

        .presentation-info-section .card-header h3,
        .add-link-section .card-header h3,
        .links-section .card-header h3 {
            font-size: 1.125rem;
            font-weight: 600;
            color: #1A2F5B;
            margin: 0;
            text-transform: none;
            letter-spacing: normal;
        }

        .presentation-info-section .card-body,
        .add-link-section .card-body,
        .links-section .card-body {
            padding: 20px;
        }

        /* Collapsible Section Styles - Matching Appearance Page */
        .collapsible-header {
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: background-color 0.2s ease;
            padding: 0;
            margin-bottom: 0;
        }

        .collapsible-header:hover {
            background-color: transparent;
        }

        .header-content {
            flex: 1;
            text-align: left;
            padding-left: 0;
        }

        .header-content h3 {
            margin: 0;
            padding-bottom: 0;
            border-bottom: none;
            text-align: left;
        }

        .header-content p {
            margin: 4px 0 0 0;
            color: #6b7280;
            font-size: 14px;
            text-align: left;
        }

        .chevron-icon {
            width: 20px;
            height: 20px;
            color: #6b7280;
            transition: transform 0.3s ease;
            user-select: none;
        }

        .chevron-icon.collapsed {
            transform: rotate(-90deg);
        }

        .collapsible-content {
            transition: max-height 0.3s ease, opacity 0.3s ease;
            overflow: hidden;
        }

        .collapsible-content.collapsed {
            max-height: 0;
            opacity: 0;
            padding: 0;
        }

        /* Message Display Styling */
        #message {
            margin-bottom: 20px;
        }

        #message .error {
            background: #fef2f2;
            border: 1px solid #fecaca;
            color: #dc2626;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 14px;
            margin-bottom: 16px;
        }

        #message .success {
            background: #f0fdf4;
            border: 1px solid #bbf7d0;
            color: #16a34a;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 14px;
            margin-bottom: 16px;
        }

        #message .info {
            background: #eff6ff;
            border: 1px solid #bfdbfe;
            color: #2563eb;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 14px;
            margin-bottom: 16px;
        }

        .form-group {
            margin-bottom: 16px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #374151;
            font-size: 16px;
        }

        .form-group input {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 0.875rem;
            background: white;
            color: #000;
            pointer-events: auto;
            z-index: 1;
            position: relative;
        }

        .form-group input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .form-group input:hover {
            border-color: #9ca3af;
        }

        /* Ensure presentation info inputs are visible */
        .presentation-info-section .form-group input {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
            width: 100% !important;
            height: auto !important;
            min-height: 40px !important;
            background: white !important;
            color: #000 !important;
            border: 1px solid #d1d5db !important;
            padding: 8px 12px !important;
            font-size: 0.875rem !important;
        }

        .preview-links {
            flex: 1;
            padding: 16px;
            padding-bottom: 8px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            background: transparent;
            overflow-y: auto;
            overflow-x: hidden;
        }

        .preview-link {
            padding: 12px 16px 12px 20px;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            text-decoration: none;
            color: #1e293b;
            font-size: 1.14rem; /* Scaled for iPhone aspect ratio (1.25rem * 0.91) */
            transition: all 0.2s;
            min-height: 64px;
            display: flex;
            align-items: center;
        }
        
        .preview-link-text {
            font-size: inherit; /* Inherit from parent .preview-link - matches public.html */
        }

        .preview-footer {
            padding: 8px 16px;
            text-align: center;
            border: none; /* No border - seamless gradient */
            background: transparent; /* Fully transparent - let gradient show through */
            flex-shrink: 0; /* Prevent footer from shrinking */
            position: sticky;
            bottom: 0;
            z-index: 10;
        }

        .preview-footer-text {
            font-size: 0.57rem; /* Scaled for iPhone aspect ratio (0.625rem * 0.91) */
            /* Color will be set by JavaScript from theme - matches profile text color */
            margin: 0;
            line-height: 1.2;
        }

        .preview-footer-text a {
            /* Color will be set by JavaScript from theme - matches profile text color */
            text-decoration: none;
            opacity: 0.8; /* Slightly transparent for link */
        }

        .preview-footer-text a:hover {
            opacity: 1; /* Full opacity on hover */
            text-decoration: underline;
        }

        .preview-link:hover {
            background: #f1f5f9;
            border-color: #cbd5e1;
        }

        /* Button Styles */
        .preview-link.soft {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .preview-link.solid {
            background: #4f46e5;
            border: 1px solid #4f46e5;
            color: white;
        }

        .preview-link.outline {
            background: transparent;
            border: 2px solid #4f46e5;
            color: #4f46e5;
        }

        /* Buttons */
        .btn {
            padding: 10px 20px;
            border-radius: 10px;
            border: none;
            cursor: pointer;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .btn-primary {
            background: #1A2F5B;
            color: white;
            font-weight: 600;
            text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
        }

        .btn-primary:hover {
            background: #152547;
            box-shadow: 0 2px 4px rgba(26, 47, 91, 0.3);
        }

        .btn-primary .fa-folder-open,
        .btn-primary .fa-images {
            color: #ffffff;
            margin-right: 6px;
        }

        .btn-ghost {
            background: #f8fafc;
            color: #64748b;
            border: 1px solid #e2e8f0;
        }

        .btn-ghost:hover {
            background: #f1f5f9;
            color: #1e293b;
        }

        .btn-sm {
            padding: 6px 12px;
            font-size: 0.75rem;
        }

        .btn-large {
            padding: 16px 32px;
            font-size: 1.1rem;
            font-weight: 600;
            min-height: 50px;
        }

        /* Button Styles for Theming */
        .link-button {
            display: block;
            padding: 12px 16px;
            margin: 8px 0;
            border-radius: 8px;
            text-decoration: none;
            color: inherit;
            transition: all 0.2s ease;
            border: none;
            cursor: pointer;
        }

        .link-button.soft {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .link-button.soft:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        }

        .link-button.solid {
            background: #4f46e5;
            color: white;
            border: 1px solid #4f46e5;
        }

        .link-button.solid:hover {
            background: #4338ca;
            border-color: #4338ca;
            transform: translateY(-2px);
        }

        .link-button.outline {
            background: transparent;
            border: 2px solid currentColor;
            color: inherit;
        }

        .link-button.outline:hover {
            background: currentColor;
            color: white;
            transform: translateY(-2px);
        }

        /* Modal Styles */
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .modal.hidden {
            display: none;
        }

        .modal-content {
            background: white;
            border-radius: 12px;
            max-width: 90vw;
            max-height: 90vh;
            overflow: auto;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            position: relative;
        }

        .modal-header h3 {
            margin: 0;
            font-size: 1.5rem;
            color: #1f2937;
        }

        .modal-body {
            padding: 20px;
        }

        /* Media Library Modal Message Display */
        #mediaModalMessage {
            position: relative;
            z-index: 10;
            margin-bottom: 15px;
            padding: 12px 16px;
            border-radius: 6px;
            font-size: 0.875rem;
            line-height: 1.5;
            font-weight: 500;
            word-wrap: break-word;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }
        
        #mediaModalMessage:empty {
            display: none !important;
        }
        
        /* Media Library Modal Styling */
        #mediaModal .modal-content {
            width: 900px !important;
            max-width: 900px !important;
            min-width: 600px;
            position: relative;
        }
        
        @media (max-width: 950px) {
            #mediaModal .modal-content {
                width: 90vw !important;
                max-width: 90vw !important;
                min-width: auto;
            }
        }

        #mediaModal .media-clear-all-btn {
            position: absolute !important;
            bottom: 20px !important;
            right: 20px !important;
            width: auto !important;
            padding: 8px 16px;
            font-size: 0.875rem;
            z-index: 100 !important;
            pointer-events: auto !important;
            cursor: pointer !important;
        }

        /* Media Library Modal Close Icon */
        #mediaModal .media-modal-close {
            position: absolute;
            top: 20px;
            right: 20px;
            background: transparent;
            border: none;
            font-size: 28px;
            color: #64748b;
            cursor: pointer;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: all 0.2s;
            z-index: 10;
            padding: 0;
            line-height: 1;
        }
        
        #mediaModal .media-modal-close:hover {
            background: #f1f5f9;
            color: #1e293b;
        }

        /* Media Library Drop Zone */
        .media-drop-zone {
            border: 2px dashed #cbd5e1;
            border-radius: 12px;
            padding: 40px 20px;
            text-align: center;
            background: #f8fafc;
            transition: all 0.3s ease;
            margin-bottom: 20px;
            cursor: pointer;
            position: relative;
            height: 180px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .media-drop-zone.drag-over {
            border-color: #4f46e5;
            background: #eef2ff;
            transform: scale(1.02);
        }

        .media-drop-zone.hidden {
            display: none;
        }

        .drop-zone-content {
            pointer-events: none;
            position: relative;
            width: 100%;
            height: 100%;
        }

        .drop-zone-main {
            text-align: center;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .drop-zone-button {
            position: absolute;
            bottom: 4px;
            right: 20px;
            pointer-events: auto;
        }

        .drop-zone-button .btn {
            padding: 8px 16px;
            font-size: 0.875rem;
        }

        .drop-zone-icon {
            font-size: 48px;
            margin-bottom: 16px;
            opacity: 0.6;
        }

        .drop-zone-text {
            font-size: 18px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 8px;
        }

        .drop-zone-subtext {
            font-size: 14px;
            color: #64748b;
            margin: 12px 0;
        }

        .drop-zone-hint {
            font-size: 12px;
            color: #94a3b8;
            margin-top: 16px;
        }

        .media-drop-zone .btn {
            pointer-events: auto;
        }

        /* Upload Progress Indicator */
        #uploadProgressContainer {
            display: flex !important;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 30px 20px !important;
            margin: 0 0 20px 0 !important;
            background: #ffffff !important;
            border-radius: 12px;
            border: 2px solid #1A2F5B !important;
            box-shadow: 0 4px 12px rgba(26, 47, 91, 0.15) !important;
            position: relative !important;
            z-index: 1 !important;
            min-height: 150px !important;
            width: 100% !important;
            visibility: visible !important;
            opacity: 1 !important;
            order: -1; /* Place at the top */
            pointer-events: auto !important;
        }
        
        #uploadProgressContainer.hidden {
            display: none !important;
            pointer-events: none !important;
        }

        .upload-progress-container.hidden {
            display: none !important;
        }
        
        /* Override global .hidden class for progress container */
        #uploadProgressContainer:not(.hidden) {
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
        }

        .upload-progress-ring {
            position: relative;
            width: 80px;
            height: 80px;
            margin-bottom: 16px;
        }

        .progress-ring {
            width: 100%;
            height: 100%;
            transform: rotate(-90deg);
        }

        .progress-ring-circle-bg {
            transition: stroke 0.3s ease;
        }

        .progress-ring-circle {
            transition: stroke-dashoffset 0.5s ease;
            stroke-dasharray: 226.194; /* 2 * π * 36 (radius) */
            stroke-dashoffset: 226.194; /* Start at 0% */
        }

        .progress-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 18px;
            font-weight: 600;
            color: #1A2F5B;
            display: flex;
            align-items: center;
            gap: 2px;
        }

        .progress-separator {
            color: #9ca3af;
            margin: 0 2px;
        }

        .progress-label {
            margin: 0;
            font-size: 14px;
            color: #64748b;
            font-weight: 500;
        }

        /* Media Library Styles */
        .media-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 16px;
        }

        .media-grid > div {
            position: relative;
            max-width: 150px;
            height: 100px;
            width: auto;
            flex-shrink: 0;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            background: white;
            overflow: hidden;
            transition: all 0.2s ease;
        }

        .media-grid > div:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            transform: translateY(-2px);
        }

        .media-grid img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            max-width: 120px;
            max-height: 120px;
        }

        .edit-btn, .delete-btn {
            position: absolute !important;
            width: 24px !important;
            height: 24px !important;
            border-radius: 50% !important;
            border: none !important;
            cursor: pointer !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            font-size: 12px !important;
            opacity: 1 !important;
            visibility: visible !important;
            pointer-events: auto !important;
            z-index: 10 !important;
        }

        .edit-btn {
            top: 4px !important;
            left: 4px !important;
            background: #3b82f6 !important;
            color: white !important;
        }

        .delete-btn {
            top: 4px !important;
            right: 4px !important;
            background: #1A2F5B !important;
            color: white !important;
        }

        .delete-btn:hover {
            background: #152547 !important;
        }

        .search-input {
            width: 200px;
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-size: 14px;
        }

        /* Image Editor Styles */
        .image-editor-modal {
            max-width: 90vw;
            max-height: 90vh;
        }

        .image-editor-container {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 400px;
        }

        .image-wrapper {
            position: relative;
            display: inline-block;
        }

        #edit-image {
            max-width: 500px;
            max-height: 500px;
            object-fit: contain;
            border-radius: 8px;
        }

        .crop-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.3);
            cursor: crosshair;
        }

        .crop-selection {
            position: absolute;
            border: 2px dashed #3b82f6;
            background: rgba(59, 130, 246, 0.1);
            cursor: move;
        }

        .crop-handle {
            position: absolute;
            width: 8px;
            height: 8px;
            background: #3b82f6;
            border: 1px solid white;
            cursor: nw-resize;
        }

        .crop-handle.nw { top: -4px; left: -4px; }
        .crop-handle.ne { top: -4px; right: -4px; }
        .crop-handle.sw { bottom: -4px; left: -4px; }
        .crop-handle.se { bottom: -4px; right: -4px; }

        /* Modal Actions */
        .modal-actions {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        /* Drag and Drop Styles */
        .drag-over {
            background-color: #f0f9ff;
            border-color: #3b82f6;
        }

        .upload-area {
            border: 2px dashed #d1d5db;
            border-radius: 8px;
            padding: 40px;
            text-align: center;
            background: #f9fafb;
            transition: all 0.2s ease;
        }

        .upload-area.drag-over {
            border-color: #3b82f6;
            background: #f0f9ff;
        }

        /* Additional utility classes */
        .text-center {
            text-align: center;
        }

        .text-sm {
            font-size: 14px;
        }

        .text-gray-500 {
            color: #6b7280;
        }

        .mb-4 {
            margin-bottom: 16px;
        }

        .mt-4 {
            margin-top: 16px;
        }

        .p-4 {
            padding: 16px;
        }

        .rounded-lg {
            border-radius: 8px;
        }

        .bg-gray-50 {
            background-color: #f9fafb;
        }

        .border {
            border: 1px solid #e5e7eb;
        }

        .border-gray-300 {
            border-color: #d1d5db;
        }

        .cursor-pointer {
            cursor: pointer;
        }

        .transition-all {
            transition: all 0.2s ease;
        }

        .hover\:bg-gray-100:hover {
            background-color: #f3f4f6;
        }

        .hover\:border-gray-400:hover {
            border-color: #9ca3af;
        }

        /* Appearance Tab Styling */
        .appearance-grid {
            display: flex;
            flex-direction: column;
            gap: 24px;
            margin-top: 20px;
        }

        .appearance-section {
            background: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            max-width: 100%;
            overflow-x: hidden;
        }

        .appearance-section h3 {
            margin: 0 0 16px 0;
            color: #1f2937;
            font-size: 1.1rem;
            font-weight: 600;
        }

        .option-group {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 1px solid #e5e7eb;
        }
        
        .option-group > label {
            margin: 0;
            padding: 0;
            font-size: 1rem;
            font-weight: 600;
            color: #1A2F5B;
        }
        
        .option-group.radio-group {
            flex-direction: row;
            gap: 16px;
        }
        
        .option-group.radio-group .option {
            margin-bottom: 0;
            font-size: 1rem;
            font-weight: 400;
            color: inherit;
        }
        
        .radio-group {
            display: flex;
            flex-direction: row;
            gap: 16px;
        }
        
        .radio-group .radio-label,
        .radio-group .radio-option {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.2s;
            margin: 0;
            font-size: 1rem;
            font-weight: 400;
            color: inherit;
        }
        
        .radio-group .radio-label:hover,
        .radio-group .radio-option:hover {
            background: #f3f4f6;
        }
        
        .radio-group .radio-label input[type="radio"],
        .radio-group .radio-option input[type="radio"] {
            margin: 0;
            flex-shrink: 0;
        }
        
        .radio-group .radio-label .radio-custom {
            display: none;
        }
        
        .radio-group .radio-option .radio-label {
            margin: 0;
            padding: 0;
            font-weight: inherit;
        }
        
        .option-group:last-child {
            border-bottom: none;
            margin-bottom: 0;
        }

        .option-group h4 {
            font-size: 1rem;
            font-weight: 600;
            color: #1A2F5B;
            margin: 0 0 12px 0;
        }
        
        .color-input-group {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .image-options {
            margin-top: 16px;
        }
        
        .source-buttons {
            display: flex;
            gap: 8px;
        }
        
        .position-controls {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }
        
        .position-slider {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        .position-slider label {
            font-size: 0.9rem;
            color: #6b7280;
            font-weight: 500;
        }
        
        .slider {
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: #e5e7eb;
            outline: none;
            -webkit-appearance: none;
        }
        
        .slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #3b82f6;
            cursor: pointer;
        }
        
        .slider::-moz-range-thumb {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #3b82f6;
            cursor: pointer;
            border: none;
        }

        .option {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .option:hover {
            background: #f3f4f6;
        }

        .option input[type="radio"] {
            margin: 0;
        }

        .color-options {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        .color-picker {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        .color-input {
            width: 90px;
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-family: monospace;
            text-align: center;
        }

        .gradient-presets {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin-bottom: 12px;
        }

        .preset {
            height: 40px;
            border-radius: 8px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s;
        }

        .preset:hover {
            border-color: #4f46e5;
            transform: scale(1.05);
        }
        
        .border-gradient-preset {
            height: 40px;
            border-radius: 8px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s ease;
        }
        
        .border-gradient-preset:hover {
            border-color: #4f46e5;
            transform: scale(1.05);
        }
        
        .favorites-section {
            margin: 12px 0;
            padding: 12px;
            background: #f8fafc;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
        }
        
        .favorites-section h4 {
            font-size: 1rem;
            font-weight: 600;
            color: #1A2F5B;
            margin: 0 0 12px 0;
        }
        
        .favorites-controls {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
            margin-bottom: 8px;
        }
        
        .gradient-stop-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            margin-top: 8px;
        }
        
        .saved-gradients {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
            gap: 8px;
            margin-top: 8px;
        }
        
        .saved-gradient-item {
            position: relative;
            height: 40px;
            border-radius: 8px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .saved-gradient-item:hover {
            border-color: #4f46e5;
            transform: scale(1.05);
        }
        
        .saved-gradient-item .delete-btn {
            position: absolute;
            top: -5px;
            right: -5px;
            width: 16px;
            height: 16px;
            background: #ef4444;
            color: white;
            border: none;
            border-radius: 50%;
            font-size: 10px;
            cursor: pointer;
            display: none;
            align-items: center;
            justify-content: center;
        }
        
        .saved-gradient-item:hover .delete-btn {
            display: flex;
        }
        
        .color-presets {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 8px;
            margin-top: 8px;
        }
        
        .color-preset {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s ease;
            position: relative;
        }
        
        .color-preset:hover {
            border-color: #3b82f6;
            transform: scale(1.1);
        }
        
        .color-preset.active {
            border-color: #3b82f6;
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
        }

        .gradient-input {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-family: monospace;
            font-size: 0.9rem;
            background: white;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        
        .gradient-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        
        .gradient-input:hover {
            border-color: #9ca3af;
        }

        /* Enhanced Gradient Editor Styles */
        .gradient-editor {
            margin-top: 16px;
            padding: 16px;
            background: #f8fafc;
            border-radius: 12px;
            border: 1px solid #e2e8f0;
            width: 100%;
            box-sizing: border-box;
            overflow-x: hidden;
        }

        .gradient-controls {
            display: grid;
            gap: 16px;
        }

        .gradient-angle label,
        .gradient-stops label,
        .gradient-preview label,
        .gradient-output label {
            display: block;
            font-weight: 600;
            color: #374151;
            margin-bottom: 8px;
            font-size: 14px;
        }

        .angle-controls {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .angle-slider {
            flex: 1;
            height: 6px;
            border-radius: 3px;
            background: #e5e7eb;
            outline: none;
            -webkit-appearance: none;
        }

        .angle-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #3b82f6;
            cursor: pointer;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .angle-slider::-moz-range-thumb {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #3b82f6;
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .angle-input {
            width: 60px;
            padding: 6px 8px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            text-align: center;
            font-size: 14px;
        }

        .gradient-stops-container {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-bottom: 12px;
            width: 100%;
            min-width: 0;
        }
        
        .gradient-stops {
            width: 100%;
            min-width: 0;
        }

        .gradient-stop {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 8px;
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            transition: all 0.2s ease;
            flex-wrap: wrap;
            width: 100%;
            box-sizing: border-box;
        }
        
        .gradient-stop > * {
            flex: 0 0 auto;
            min-width: 0;
        }
        
        .gradient-stop:hover {
            background-color: #f8fafc;
            border-color: #cbd5e1;
        }
        
        .gradient-stop.dragging {
            opacity: 0.5;
            transform: rotate(2deg);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        
        .drag-handle {
            cursor: grab;
            user-select: none;
            padding: 8px;
            color: #666;
            font-size: 14px;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 32px;
            min-height: 32px;
            border-radius: 4px;
            transition: all 0.2s ease;
        }
        
        .gradient-stop .drag-handle:hover {
            background-color: #f1f5f9;
            color: #374151;
        }
        
        .drag-handle:active {
            cursor: grabbing;
        }


        .gradient-stop-position-label {
            font-size: 0.875rem;
            font-weight: 500;
            color: #1A2F5B;
            white-space: nowrap;
        }
        
        .gradient-stop-position {
            width: 80px;
            flex: 0 1 80px;
            padding: 6px 8px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            text-align: center;
            font-size: 14px;
        }
        .gradient-stop-remove {
            width: 32px;
            height: 32px;
            border: none;
            background: #ef4444;
            color: white;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            margin-left: auto;
        }

        .gradient-stop-remove:hover {
            background: #dc2626;
        }

        .gradient-preview-box {
            width: 100%;
            height: 60px;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
        }

        .gradient-output-group {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: flex-start;
            width: 100%;
            min-width: 0;
        }
        
        .gradient-output {
            width: 100%;
        }
        
        .gradient-output-group .gradient-input {
            flex: 1 1 0%;
            min-width: 200px;
            width: auto;
            min-height: 40px;
            resize: none;
            overflow-wrap: break-word;
            word-break: break-all;
            white-space: normal;
            font-size: 12px;
            line-height: 1.2;
            border-radius: 6px;
            padding: 8px 10px;
            overflow: auto;
            box-sizing: border-box;
        }
        
        .gradient-output-group .gradient-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
            min-height: 40px;
            height: auto;
        }

        .btn-small {
            padding: 6px 12px;
            font-size: 12px;
            border-radius: 6px;
        }

        .form-select {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            background: white;
        }

        .file-input {
            width: 100%;
            padding: 8px 12px;
            border: 2px dashed #d1d5db;
            border-radius: 8px;
            background: #f9fafb;
            cursor: pointer;
            transition: border-color 0.2s;
        }

        .file-input:hover {
            border-color: #4f46e5;
        }

        .image-preview {
            margin-top: 12px;
            text-align: center;
        }

        .appearance-actions {
            grid-column: 1 / -1;
            display: flex;
            gap: 12px;
            justify-content: center;
            margin-top: 24px;
            padding-top: 24px;
            border-top: 1px solid #e5e7eb;
        }

        .theme-management {
            grid-column: 1 / -1;
            margin-top: 24px;
            padding-top: 24px;
            border-top: 1px solid #e5e7eb;
        }

        .theme-management h3 {
            margin: 0 0 16px 0;
            font-size: 16px;
            font-weight: 600;
            color: #1f2937;
        }

        .theme-management h4 {
            margin: 16px 0 8px 0;
            font-size: 14px;
            font-weight: 500;
            color: #374151;
        }

        .theme-save-section {
            margin-bottom: 20px;
        }

        .input-group {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .input-group .btn,
        .gradient-output-group .btn {
            flex-shrink: 0;
            min-width: 120px;
            width: 120px;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .form-input {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-size: 14px;
            min-height: 40px;
        }

        .form-input-container {
            flex: 1;
            position: relative;
        }

        .contenteditable-input {
            min-height: 48px;
            outline: none;
            white-space: pre-wrap;
            word-wrap: break-word;
            font-size: 16px;
            padding: 12px 16px;
        }

        .contenteditable-input:empty:before {
            content: attr(data-placeholder);
            color: #6b7280;
            pointer-events: none;
            font-size: 16px;
            font-weight: 500;
        }

        .contenteditable-input:focus {
            outline: none;
            border-color: #4f46e5;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        /* Add Link Form Styling */
        .add-link-section {
            margin: 24px 0;
        }

        .add-link-form {
            margin-top: 0;
            padding: 0;
        }

        .links-section {
            margin: 24px 0;
        }

        .no-links-message {
            text-align: center;
            padding: 40px 20px;
            color: #6b7280;
            font-style: italic;
            background: #f9fafb;
            border: 2px dashed #d1d5db;
            border-radius: 8px;
            margin-top: 16px;
        }

        .no-links-message p {
            margin: 0;
            font-size: 16px;
        }

        .add-link-form .form-row {
            margin-bottom: 20px;
            flex-direction: column;
            align-items: stretch;
        }

        .add-link-form .form-group {
            margin-bottom: 20px;
        }

        .add-link-form .form-group label {
            font-size: 16px;
            font-weight: 600;
            color: #374151;
            margin-bottom: 8px;
        }

        .add-link-form .form-group input {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
            width: 100% !important;
            height: auto !important;
            min-height: 40px !important;
            background: white !important;
            color: #000 !important;
            border: 1px solid #d1d5db !important;
            padding: 8px 12px !important;
            font-size: 0.875rem !important;
        }

        .add-link-form .btn {
            padding: 16px 24px;
            font-size: 16px;
            font-weight: 600;
            min-height: 48px;
        }

        .add-link-error {
            margin-top: 12px;
            padding: 12px 16px;
            background: #fef2f2;
            border: 1px solid #fecaca;
            color: #dc2626;
            border-radius: 8px;
            font-size: 14px;
            display: none;
        }

        .add-link-error.show {
            display: block !important;
        }

        /* Image Input Styling */
        .image-input-container {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .image-button-row {
            display: flex;
            gap: 8px;
        }

        .btn-half {
            flex: 1;
            min-width: 0;
        }

        .image-preview {
            position: relative;
            display: inline-block;
            max-width: 200px;
        }

        .image-preview img {
            width: 100%;
            height: 120px;
            object-fit: cover;
            border-radius: 8px;
            border: 1px solid #d1d5db;
        }

        .btn-remove-image {
            position: absolute;
            top: -8px;
            right: -8px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #1A2F5B;
            color: white;
            border: none;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
            z-index: 10;
        }

        .btn-remove-image:hover {
            background: #152547;
        }

        .btn-edit-image {
            position: absolute;
            top: -8px;
            left: -8px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #1A2F5B;
            color: white;
            border: none;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
            z-index: 10;
        }

        .btn-edit-image:hover {
            background: #152547;
        }

        #qr-logo-preview {
            text-align: left;
            max-width: fit-content;
            width: fit-content;
        }

        #qr-logo-preview img {
            width: auto !important;
            height: auto !important;
            max-width: 100% !important;
            max-height: 80px !important;
            object-fit: contain !important;
            display: block;
        }

        .btn-secondary {
            background: #6b7280;
            color: white;
            border: none;
            padding: 12px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: background-color 0.2s;
        }

        .btn-secondary:hover {
            background: #4b5563;
        }

        /* Link Image Styling */
        .link-image {
            width: 40px;
            height: 40px;
            flex-shrink: 0;
            margin-right: 12px;
        }

        .link-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 8px;
            border: 1px solid #d1d5db;
        }

        .link-text-content {
            flex: 1;
            min-width: 0;
        }

        .link-drag-column {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            flex-shrink: 0;
        }

        .link-image-column {
            display: flex;
            flex-direction: row;
            align-items: flex-start;
            gap: 8px;
            flex-shrink: 0;
            width: 120px;
            height: 72px;
        }

        .link-text-column {
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex: 1;
            min-width: 0;
        }


        /* Preview Link Image Styling */
        .preview-link-content {
            display: flex;
            align-items: center;
            gap: 12px;
            width: 100%;
            height: 100%;
        }

        .preview-link-image {
            width: 48px;
            height: 48px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            border-radius: 8px;
            background: #e5e7eb;
            border: 1px solid #d1d5db;
            box-sizing: border-box;
        }

        .preview-link-image-wrapper {
            padding: 6px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 12px;
        }

        .preview-link-image img {
            width: 100% !important; 
            height: 100% !important;      
            object-fit: cover !important;              /* fill square container, crop if needed */
            object-position: center center !important; /* center the image within the container */
            transform-origin: center center !important;
            transition: transform 120ms ease !important;
            display: block !important;
            max-width: 100% !important;
            max-height: 100% !important;
        }


        /* Link Image Editing Styling */

        .link-image-preview {
            position: relative;
            width: 72px;
            height: 72px;
            overflow: visible;
            z-index: 1;
        }

        .link-image-container {
            width: 72px;
            height: 72px;
            overflow: hidden;               /* important */
            border-radius: 8px;
            border: 2px solid #d1d5db;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .link-image-container img {
            width: 100% !important; 
            height: 100% !important;      
            object-fit: contain !important;              /* fit image within container, maintain aspect ratio */
            transform-origin: center center !important;
            transition: transform 120ms ease !important;
            display: block !important;
            max-width: 100% !important;
            max-height: 100% !important;
        }

        /* Link images in preview - border-radius is handled by container div */
        #preview-links img {
            width: 100% !important;
            height: 100% !important;
            object-fit: cover !important;
        }

        .btn-remove-link-image {
            position: absolute;
            top: -6px;
            right: -6px;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #1A2F5B;
            color: white;
            border: none;
            font-size: 12px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
            z-index: 100;
        }

        .btn-remove-link-image:hover {
            background: #152547;
        }
        .btn-edit-link-image {
            position: absolute;
            top: -6px;
            left: -6px;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #1A2F5B;
            color: white;
            border: none;
            font-size: 10px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
            z-index: 100;
        }

        .btn-edit-link-image:hover {
            background: #152547;
        }

        .link-image-editor {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            border: 1px solid #d1d5db;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            z-index: 10000;
            min-width: 300px;
            max-width: 400px;
        }

        .link-image-editor-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 9999;
        }

        .image-position-controls label {
            display: block;
            font-size: 14px;
            font-weight: 600;
            color: #374151;
            margin-bottom: 8px;
        }

        .position-sliders {
            margin-bottom: 20px;
        }

        .slider-group {
            margin-bottom: 16px;
        }

        .slider-group label {
            display: flex;
            justify-content: space-between;
            font-size: 13px;
            margin-bottom: 8px;
            color: #4b5563;
        }

        .slider-group input[type="range"] {
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: #e5e7eb;
            outline: none;
            cursor: pointer;
        }

        .slider-group input[type="range"]::-webkit-slider-thumb {
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #3b82f6;
            cursor: pointer;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .position-presets {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }

        .position-presets button {
            padding: 8px 12px;
            font-size: 12px;
            background: #f8fafc;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            color: #374151;
        }

        .position-presets button:hover {
            background: #e2e8f0;
            border-color: #94a3b8;
        }

        .link-image-buttons {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            height: 100%;
            gap: 4px;
        }

        .link-image-buttons .btn-icon {
            background: none !important;
            border: none !important;
            padding: 6px 8px !important;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px !important;
            transition: background-color 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 32px !important;
            min-height: 32px !important;
            width: auto !important;
            height: auto !important;
            line-height: 1;
            color: #1A2F5B;
            box-shadow: none !important;
        }

        .link-image-buttons .btn-icon:hover {
            background: rgba(0, 0, 0, 0.1) !important;
        }

        .link-image-buttons .btn-icon .fa-folder-open,
        .link-image-buttons .btn-icon .fa-images {
            color: #1A2F5B;
        }

        .form-input:focus {
            outline: none;
            border-color: #4f46e5;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        .saved-themes-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .saved-theme-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            background: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .saved-theme-item:hover {
            background: #f3f4f6;
            border-color: #d1d5db;
        }

        .saved-theme-info {
            flex: 1;
        }

        .saved-theme-name {
            font-weight: 500;
            color: #1f2937;
            margin-bottom: 4px;
        }

        .saved-theme-preview {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .saved-theme-preview-color {
            width: 20px;
            height: 20px;
            border-radius: 4px;
            border: 1px solid #d1d5db;
        }

        .saved-theme-actions {
            display: flex;
            gap: 4px;
        }

        .btn-sm {
            padding: 4px 8px;
            font-size: 12px;
        }

        .btn-danger {
            background: #dc2626;
            color: white;
            border: none;
        }

        .btn-danger:hover {
            background: #b91c1c;
        }

        .form-select {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 14px;
            background: white;
            cursor: pointer;
        }

        .form-select:focus {
            outline: none;
            border-color: #4f46e5;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        .form-textarea {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 14px;
            font-family: inherit;
            resize: vertical;
            min-height: 80px;
        }

        .form-textarea:focus {
            outline: none;
            border-color: #4f46e5;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        .text-style-controls {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .style-checkbox {
            margin-right: 8px;
        }


        .formatting-controls {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
        }

        .control-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .control-group label {
            font-size: 12px;
            font-weight: 500;
            color: #6b7280;
        }

        .rtf-editor {
            border: 1px solid #d1d5db;
            border-radius: 6px;
            background: white;
        }

        .rtf-toolbar {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: #f9fafb;
            border-bottom: 1px solid #e5e7eb;
            border-radius: 6px 6px 0 0;
        }

        .rtf-select {
            padding: 4px 8px;
            border: 1px solid #d1d5db;
            border-radius: 4px;
            font-size: 12px;
            background: white;
            min-width: 100px;
        }

        .rtf-color-picker {
            width: 28px;
            height: 28px;
            border: 1px solid #d1d5db;
            border-radius: 4px;
            cursor: pointer;
            padding: 0;
            background: none;
        }

        .rtf-color-picker::-webkit-color-swatch-wrapper {
            padding: 0;
        }

        .rtf-color-picker::-webkit-color-swatch {
            border: none;
            border-radius: 3px;
        }

        .rtf-btn {
            padding: 4px 8px;
            border: 1px solid #d1d5db;
            border-radius: 4px;
            background: white;
            cursor: pointer;
            font-size: 12px;
            font-weight: bold;
            transition: all 0.2s;
            min-width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .rtf-btn:hover {
            background: #f3f4f6;
            border-color: #9ca3af;
        }

        .rtf-btn.active {
            background: #3b82f6;
            color: white;
            border-color: #3b82f6;
        }

        .rtf-content {
            min-height: 60px;
            padding: 12px;
            border: none;
            outline: none;
            font-family: inherit;
            font-size: 14px;
            line-height: 1.5;
            resize: vertical;
        }

        .rtf-content:empty:before {
            content: attr(placeholder);
            color: #9ca3af;
            font-style: italic;
        }

        .rtf-info {
            padding: 8px 12px;
            background: #f9fafb;
            border-top: 1px solid #e5e7eb;
            border-radius: 0 0 6px 6px;
        }

        .rtf-info small {
            color: #6b7280;
            font-size: 11px;
        }

        .char-counter {
            padding: 4px 12px;
            background: #f9fafb;
            border-top: 1px solid #e5e7eb;
            text-align: right;
            font-size: 11px;
            color: #6b7280;
        }

        .char-counter.warning {
            color: #f59e0b;
        }

        .char-counter.error {
            color: #ef4444;
        }


        .link-title, .link-url {
            transition: all 0.2s;
        }

        .link-title:focus, .link-url:focus {
            outline: none;
            background: #f8fafc;
            border: 2px solid #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .link-title:hover, .link-url:hover {
            background: #f9fafb;
        }

        .link-title:empty:before {
            content: "Click to edit title";
            color: #9ca3af;
            font-style: italic;
            font-size: 16px;
        }

        .link-url:empty:before {
            content: "Click to edit URL";
            color: #9ca3af;
            font-style: italic;
            font-size: 12px;
        }

        .link-title-container {
            position: relative;
        }

        .link-rtf-toolbar {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            padding: 8px 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            z-index: 20;
            gap: 8px;
            align-items: center;
            justify-content: center;
            margin-top: 4px;
        }

        .link-title-container:hover .link-rtf-toolbar {
            display: flex;
        }
        
        .link-title-container.editing .link-rtf-toolbar {
            display: flex;
        }

        .link-title-container.editing .link-title {
            background: #f0f9ff;
            border: 2px solid #3b82f6;
        }

        .link-rtf-toolbar .rtf-btn {
            padding: 6px 10px;
            font-size: 12px;
            min-width: 28px;
            height: 28px;
            border-radius: 4px;
            border: 1px solid #d1d5db;
            background: white;
            color: #374151;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
        }

        .link-rtf-toolbar .rtf-btn:hover {
            background: #f3f4f6;
            border-color: #9ca3af;
        }

        .link-rtf-toolbar .rtf-btn.active {
            background: #3b82f6;
            color: white;
            border-color: #3b82f6;
        }

        .checkbox-label {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            font-size: 0.9rem;
            color: #374151;
        }

        .checkbox-label input[type="checkbox"] {
            margin: 0;
            width: 16px;
            height: 16px;
        }
        /* Responsive media queries disabled - fixed layout */
        /*
        @media (max-width: 1024px) {
            .content-header-new {
                padding: 12px 16px;
                gap: 12px;
                flex-wrap: wrap;
            }
            
            .collection-header {
                flex-wrap: wrap;
                gap: 8px;
            }
            
            .collection-name-input {
                min-width: 150px;
                max-width: 100%;
                font-size: 18px;
            }
            
            .collection-meta {
                flex-wrap: wrap;
            }
            
            .visibility-select-compact {
                min-width: 100px;
            }
            
            .passkey-input-compact {
                min-width: 100px;
            }
            
            .btn-save-sticky {
                width: 100%;
                margin-top: 8px;
            }
        }

        @media (max-width: 768px) {
            .appearance-grid {
                gap: 16px;
            }
        }

        @media (max-width: 768px) {
            .media-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 8px;
            }
            
            .media-grid > div {
                max-width: 120px;
                height: 80px;
            }
            
            .media-grid img {
                max-width: 100px;
                max-height: 100px;
            }
        }

        @media (max-width: 480px) {
            .media-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 6px;
            }
            
            .media-grid > div {
                max-width: 100px;
                height: 70px;
            }
            
            .media-grid img {
                max-width: 80px;
                max-height: 80px;
            }
        }
        */
    