        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        /* Ship preview modal */
        .ship-preview-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85);
            z-index: 10000;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.3s ease;
        }
        
        .ship-preview-modal.active {
            display: flex;
        }
        
        .preview-window {
            background: #1a1a2e;
            border: 2px solid #4a9eff;
            border-radius: 8px;
            width: 90%;
            max-width: 1200px;
            height: 80%;
            max-height: 800px;
            display: flex;
            flex-direction: column;
            box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
        }
        
        .preview-titlebar {
            background: linear-gradient(to bottom, #2d3561, #1a1a2e);
            border-bottom: 1px solid #4a9eff;
            padding: 12px 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 6px 6px 0 0;
        }
        
        .preview-title {
            color: #fff;
            font-size: 18px;
            font-weight: bold;
        }
        
        .preview-close {
            background: #ff4444;
            color: white;
            border: none;
            width: 30px;
            height: 30px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.3s;
        }
        
        .preview-close:hover {
            background: #ff6666;
        }
        
        .preview-content {
            display: flex;
            flex: 1;
            overflow: hidden;
        }
        
        .preview-left {
            flex: 1.5;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px 5px; /* 20px top/bottom, 5px left/right */
            min-width: 0;
            position: relative;
            overflow: hidden;
        }
        
        .preview-canvas {
            background: transparent; /* Background now drawn on canvas */
            border: 1px solid #2a5f8f;
            cursor: grab;
            box-shadow: 0 0 30px rgba(74, 158, 255, 0.3);
            display: block;
            max-width: 100%;
            max-height: calc(100% - 50px); /* Account for controls */
        }
        
        .preview-canvas:active {
            cursor: grabbing;
        }
        
        .preview-controls {
            display: flex;
            gap: 8px;
            margin-top: 15px;
            background: rgba(0, 0, 0, 0.5);
            padding: 10px;
            border-radius: 8px;
            backdrop-filter: blur(10px);
        }
        
        .preview-btn {
            background: #4a9eff;
            color: white;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .preview-btn:hover {
            background: #5ab3ff;
            transform: translateY(-2px);
        }
        
        .preview-right {
            width: 300px;
            background: rgba(0, 0, 0, 0.3);
            border-left: 1px solid #4a9eff;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        .preview-stats {
            padding: 12px 15px;
            flex: 1;
            overflow-y: auto;
        }
        
        .preview-stats h3 {
            color: #4a9eff;
            margin: 0 0 10px 0;
            font-size: 16px;
            border-bottom: 1px solid #4a9eff;
            padding-bottom: 3px;
        }
        
        .preview-stats h4 {
            color: #4a9eff;
            margin: 12px 0 6px 0;
            font-size: 13px;
            text-transform: uppercase;
            opacity: 0.8;
        }
        
        .stat-row {
            display: flex;
            justify-content: space-between;
            padding: 3px 0;
            border-bottom: 1px solid rgba(74, 158, 255, 0.1);
        }
        
        .stat-label {
            color: #999;
            font-size: 13px;
        }
        
        .stat-value {
            color: #fff;
            font-size: 13px;
            font-weight: bold;
        }
        
        .parts-used {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-top: 10px;
        }
        
        .part-tag {
            background: rgba(74, 158, 255, 0.2);
            color: #4a9eff;
            padding: 3px 8px;
            border-radius: 3px;
            font-size: 12px;
            border: 1px solid #4a9eff;
        }
        
        .preview-author {
            margin-top: 10px;
            padding-top: 8px;
            border-top: 1px solid rgba(74, 158, 255, 0.3);
        }
        
        .preview-author a:hover {
            color: #6ab7ff !important;
            text-decoration: underline !important;
        }
        
        .preview-actions {
            padding: 12px;
            background: rgba(0, 0, 0, 0.5);
            border-top: 1px solid #4a9eff;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        .preview-action-btn {
            background: #4a9eff;
            color: white;
            border: none;
            padding: 8px 12px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        
        .preview-action-btn:hover {
            background: #5ab3ff;
            transform: translateX(5px);
        }
        
        .preview-action-btn.upvote-btn {
            background: #007bff !important;
        }
        
        .preview-action-btn.upvote-btn:hover {
            background: #0056b3 !important;
        }
        
        .preview-action-btn.upvote-btn.voted {
            background: #2a2a3e !important;
            opacity: 0.6;
        }
        
        .preview-action-btn.upvote-btn.voted:hover {
            background: #2a2a3e !important;
            opacity: 0.7;
        }
        
        .preview-action-btn.approve-btn {
            background: #28a745;
        }
        
        .preview-action-btn.reject-btn {
            background: #dc3545;
        }
        
        .preview-action-btn.edit-btn {
            background: #ffa500;
        }
        
        .preview-action-btn.delete-btn {
            background: #dc3545;
        }
        
        .preview-action-btn.copy-clipboard-btn {
            background: #6c757d;
            margin-top: auto;
        }
        
        .preview-action-btn.copy-clipboard-btn:hover {
            background: #7d868f;
        }
        
        /* Removed old preview-close styles */
        
        .zoom-controls {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(26, 26, 46, 0.95);
            padding: 10px;
            border-radius: 5px;
        }
        
        .zoom-label {
            color: #999;
            font-size: 14px;
        }
        
        /* Share/Export buttons */
        .ship-actions {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-top: 0; /* Remove gap between canvas and buttons */
        }
        
        .action-btn {
            padding: 8px;
            background: rgba(74, 158, 255, 0.1);
            border: 1px solid #4a9eff;
            border-radius: 4px;
            color: #4a9eff;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
        }
        
        .action-btn:hover {
            background: rgba(74, 158, 255, 0.2);
            transform: translateY(-1px);
        }
        
        .share-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 10001;
            align-items: center;
            justify-content: center;
        }
        
        .share-modal.active {
            display: flex;
        }
        
        .share-content {
            background: #1a1a2e;
            padding: 30px;
            border-radius: 10px;
            border: 2px solid #4a9eff;
            max-width: 500px;
            width: 90%;
            position: relative;
        }
        
        .share-close-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background: #ff3b30;
            color: white;
            border: none;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }
        
        .share-close-btn:hover {
            background: #ff5555;
            transform: rotate(90deg);
        }
        
        .share-title {
            color: #4a9eff;
            margin-bottom: 20px;
            font-size: 20px;
        }
        
        .share-url {
            background: #0f0f1e;
            padding: 15px;
            border: 1px solid #4a9eff;
            border-radius: 5px;
            color: white;
            margin-bottom: 20px;
            word-break: break-all;
            user-select: all;
        }
        
        .share-buttons {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 10px;
        }
        
        .share-platform-btn {
            padding: 12px;
            background: #4a9eff;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 14px;
            min-height: 44px;
        }
        
        .share-platform-btn:hover {
            background: #3a8eef;
            transform: translateY(-2px);
        }
        
        /* Edit Modal */
        .edit-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 10001;
            align-items: center;
            justify-content: center;
        }
        
        .edit-modal.active {
            display: flex;
        }
        
        .edit-content {
            background: #1a1a2e;
            padding: 30px;
            border-radius: 10px;
            border: 2px solid #4a9eff;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            position: relative;
        }
        
        .edit-close-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background: #ff3b30;
            color: white;
            border: none;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }
        
        .edit-close-btn:hover {
            background: #ff5555;
            transform: rotate(90deg);
        }
        
        .edit-title {
            color: #4a9eff;
            margin-bottom: 20px;
            font-size: 20px;
        }
        
        .edit-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        
        .edit-group {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        
        .edit-label {
            color: #999;
            font-size: 14px;
        }
        
        .edit-input, .edit-textarea {
            background: #0f0f1e;
            border: 1px solid #4a9eff;
            border-radius: 5px;
            color: white;
            padding: 10px;
            font-size: 14px;
        }
        
        .edit-textarea {
            min-height: 200px;
            font-family: monospace;
            resize: vertical;
        }
        
        .edit-btn {
            padding: 10px 20px;
            background: #4a9eff;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 14px;
        }
        
        .edit-btn:hover {
            background: #3a8eef;
            transform: translateY(-2px);
        }

        html, body {
            height: 100%;
            overflow-x: hidden;
        }

        body {
            font-family: 'Exo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background-color: #0a0a0a;
            color: #ffffff;
            line-height: 1.6;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            position: relative;
        }

        /* Application Header */
        .app-header {
            background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
            border-bottom: 1px solid #2a3f5f;
            padding: 10px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-shrink: 0;
        }

        .app-title {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .app-logo {
            height: 40px;
            width: auto;
        }

        .app-name {
            font-size: 1.5em;
            font-weight: 600;
            color: #4a9eff;
        }

        .header-actions {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        /* Main Layout */
        .app-container {
            display: flex;
            flex: 1;
            overflow: hidden;
            min-height: calc(100vh - 60px); /* Account for header */
        }

        /* Left Panel - Ship Browser */
        .main-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: #0a0a0a;
        }

        /* Filters Bar */
        .filters-bar {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            padding: 15px 20px;
            border-bottom: 1px solid #2a3f5f;
            position: relative;
        }
        
        .filters-bar form {
            display: flex;
            gap: 15px;
            align-items: center;
            flex-wrap: wrap;
            justify-content: space-between;
        }
        
        .filters-left {
            display: flex;
            gap: 15px;
            align-items: center;
            flex: 1;
        }
        
        .filters-right {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        .filter-group {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .filter-label {
            color: #888;
            font-size: 0.9em;
            font-weight: 500;
        }

        .filter-select {
            background: #1a1a2e;
            border: 1px solid #2a3f5f;
            color: #fff;
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 0.9em;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        input.filter-select {
            cursor: text;
            min-width: 200px;
        }
        
        input.filter-select::placeholder {
            color: #8b95a7;
            opacity: 0.7;
        }

        .filter-select:hover, .filter-select:focus {
            border-color: #4a9eff;
            background: #16213e;
            outline: none;
        }
        
        .filter-select option {
            background: #1a1a2e;
            color: #fff;
        }
        

        .filter-button {
            background: linear-gradient(135deg, #4a9eff 0%, #2a7fff 100%);
            color: white;
            border: none;
            padding: 6px 16px;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.9em;
        }
        
        /* Search button - hidden on desktop, visible on mobile */
        .search-button {
            display: none;
            background: linear-gradient(135deg, #4a9eff 0%, #2a7fff 100%);
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.9em;
            white-space: nowrap;
        }
        
        .search-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
        }
        
        .search-button:active {
            transform: translateY(0);
        }
        
        .search-group {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .filter-button:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
        }

        .ship-count {
            color: #888;
            font-size: 0.9em;
            margin-left: 15px;
            white-space: nowrap;
            display: flex;
            align-items: center;
        }

        /* Ships Grid */
        .ships-container {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 20px;
            -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        }

        .ships-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 15px;
        }

        .ship-card {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            border-radius: 10px;
            border: 1px solid #2a3f5f;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            display: flex;
            flex-direction: column;
            position: relative;
            opacity: 0;
            animation: fadeInUp 0.6s ease forwards;
        }
        
        /* Stagger animation for visual appeal */
        .ship-card:nth-child(1) { animation-delay: 0.05s; }
        .ship-card:nth-child(2) { animation-delay: 0.1s; }
        .ship-card:nth-child(3) { animation-delay: 0.15s; }
        .ship-card:nth-child(4) { animation-delay: 0.2s; }
        .ship-card:nth-child(5) { animation-delay: 0.25s; }
        .ship-card:nth-child(6) { animation-delay: 0.3s; }
        .ship-card:nth-child(7) { animation-delay: 0.35s; }
        .ship-card:nth-child(8) { animation-delay: 0.4s; }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .ship-card:hover {
            transform: translateY(-8px) scale(1.02);
            border-color: #4a9eff;
            box-shadow: 0 15px 40px rgba(74, 158, 255, 0.4), 0 0 60px rgba(74, 158, 255, 0.1);
        }
        
        
        .ship-card:hover .ship-name {
            color: #6ab7ff;
        }

        .ship-header {
            padding: 10px 12px;
            background: rgba(0, 0, 0, 0.3);
            border-bottom: 1px solid #2a3f5f;
            display: flex;
            justify-content: space-between;
        }

        .ship-header-left {
            flex: 1;
            min-width: 0;
        }

        .ship-header-right {
            text-align: right;
            flex-shrink: 0;
            margin-left: 10px;
        }

        .ship-name {
            font-size: 1.1em;
            font-weight: 600;
            color: #4a9eff;
            margin-bottom: 3px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.2;
        }

        .ship-author {
            color: #888;
            font-size: 0.85em;
            line-height: 1.2;
        }

        .ship-class {
            font-size: 1.1em;
            font-weight: 600;
            color: #ffa500;
            margin-bottom: 3px;
            line-height: 1.2;
        }

        .ship-date {
            color: #666;
            font-size: 0.85em;
            line-height: 1.2;
        }

        .ship-display {
            height: 190px; /* Same as canvas height */
            background: transparent; /* Background now drawn on canvas */
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            padding: 0; /* Remove all padding */
            margin: 0; /* Remove any margin */
        }

        .ship-canvas {
            /* New dimensions: 323x190 - wider but same height */
            width: 323px !important;
            height: 190px !important;
            opacity: 0;
            transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .ship-canvas.loaded {
            opacity: 1;
        }
        
        /* Hover transform now handled in JavaScript
        .ship-card:hover .ship-canvas {
            transform: scale(1.1) rotate(2deg);
        } */
        
        /* Skeleton loader */
        .skeleton-loader {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 80px;
            height: 80px;
        }
        
        .skeleton-loader::before {
            content: '';
            display: block;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            border: 3px solid rgba(74, 158, 255, 0.1);
            border-top-color: #4a9eff;
            animation: skeleton-spin 1s linear infinite;
        }
        
        @keyframes skeleton-spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        /* Empty states */
        .empty-state {
            text-align: center;
            padding: 80px 20px;
            color: #8b95a7;
            animation: fadeIn 0.6s ease;
            grid-column: 1 / -1;
        }
        
        .empty-state-icon {
            font-size: 72px;
            margin-bottom: 24px;
            color: #4a9eff;
            opacity: 0.3;
            animation: pulse 2s ease-in-out infinite;
        }
        
        .empty-state-title {
            font-size: 28px;
            font-weight: 600;
            color: #4a9eff;
            margin-bottom: 12px;
        }
        
        .empty-state-message {
            font-size: 16px;
            color: #666;
            max-width: 450px;
            margin: 0 auto 24px;
            line-height: 1.6;
        }
        
        .empty-state-action {
            margin-top: 24px;
        }
        
        .empty-state-button {
            background: linear-gradient(135deg, #4a9eff 0%, #2a7fff 100%);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
        }
        
        .empty-state-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(74, 158, 255, 0.4);
        }
        
        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 0.3; }
            50% { transform: scale(1.1); opacity: 0.5; }
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        /* Toast Notifications */
        .toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 20000;
            pointer-events: none;
        }
        
        .toast {
            background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
            border: 1px solid #4a9eff;
            border-radius: 12px;
            padding: 16px 20px;
            margin-bottom: 10px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(74, 158, 255, 0.2);
            display: flex;
            align-items: center;
            gap: 12px;
            pointer-events: auto;
            animation: slideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            transition: all 0.3s ease;
            min-width: 300px;
            max-width: 400px;
        }
        
        .toast.success {
            border-color: #34c759;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(52, 199, 89, 0.2);
        }
        
        .toast.error {
            border-color: #ff3b30;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 59, 48, 0.2);
        }
        
        .toast.warning {
            border-color: #ffa500;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 165, 0, 0.2);
        }
        
        .toast-icon {
            font-size: 24px;
            flex-shrink: 0;
        }
        
        .toast.success .toast-icon { color: #34c759; }
        .toast.error .toast-icon { color: #ff3b30; }
        .toast.warning .toast-icon { color: #ffa500; }
        
        .toast-message {
            flex: 1;
            color: #fff;
            font-size: 14px;
            line-height: 1.4;
        }
        
        .toast-close {
            background: none;
            border: none;
            color: #8b95a7;
            font-size: 20px;
            cursor: pointer;
            padding: 0;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: color 0.2s;
            flex-shrink: 0;
        }
        
        .toast-close:hover {
            color: #fff;
        }
        
        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }
        
        @keyframes slideOut {
            from {
                transform: translateX(0);
                opacity: 1;
            }
            to {
                transform: translateX(100%);
                opacity: 0;
            }
        }
        
        .toast.hiding {
            animation: slideOut 0.3s ease-in-out;
        }

        .ship-actions, .ship-footer {
            padding: 10px;
            display: flex;
            justify-content: space-evenly;
            align-items: center;
            gap: 10px;
            background: rgba(0, 0, 0, 0.2);
        }
        
        .ship-actions form, .ship-footer form {
            display: inline-flex;
            margin: 0;
        }

        .copy-btn {
            background: linear-gradient(135deg, #4a9eff 0%, #2a7fff 100%);
            color: white;
            border: none;
            padding: 8px;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-size: 14px;
            width: 36px;
            height: 36px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }
        
        .copy-btn::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            transition: width 0.5s, height 0.5s;
            transform: translate(-50%, -50%);
        }
        
        .copy-btn:hover::after {
            width: 200px;
            height: 200px;
        }

        .copy-btn:hover {
            transform: translateY(-2px) scale(1.05);
            box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
        }
        
        .copy-btn:active {
            transform: translateY(0) scale(1.02);
        }

        .copy-btn.copied {
            background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
        }

        /* Pagination */
        .pagination {
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            border-top: 1px solid #2a3f5f;
        }

        .page-btn {
            padding: 8px 12px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid #2a3f5f;
            color: #fff;
            text-decoration: none;
            border-radius: 6px;
            transition: all 0.3s ease;
            font-size: 0.9em;
        }

        .page-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: #4a9eff;
        }

        .page-btn.active {
            background: linear-gradient(135deg, #4a9eff 0%, #2a7fff 100%);
            border-color: #4a9eff;
        }

        .page-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
            pointer-events: none;
        }

        .page-info {
            color: #888;
            font-size: 0.9em;
        }

        /* Right Panel - Upload Form */
        .side-panel {
            width: 380px;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            border-left: 1px solid #2a3f5f;
            display: flex;
            flex-direction: column;
            flex-shrink: 0;
        }

        .panel-header {
            padding: 20px;
            background: rgba(0, 0, 0, 0.3);
            border-bottom: 1px solid #2a3f5f;
        }

        .panel-title {
            font-size: 1.3em;
            color: #4a9eff;
            font-weight: 600;
        }

        .panel-content {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-label {
            display: block;
            margin-bottom: 6px;
            color: #cccccc;
            font-weight: 500;
            font-size: 0.9em;
        }

        .form-input, .form-textarea {
            width: 100%;
            padding: 10px 12px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid #2a3f5f;
            border-radius: 6px;
            color: #ffffff;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        .form-textarea {
            min-height: 200px;
            resize: vertical;
            font-family: 'Courier New', monospace;
            font-size: 12px;
        }

        .form-input:focus, .form-textarea:focus {
            outline: none;
            border-color: #4a9eff;
            background: rgba(255, 255, 255, 0.08);
            box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
        }

        .form-submit {
            background: linear-gradient(135deg, #4a9eff 0%, #2a7fff 100%);
            color: white;
            border: none;
            padding: 12px 24px;
            font-size: 15px;
            font-weight: bold;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
        }

        .form-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(74, 158, 255, 0.3);
        }

        .message {
            padding: 12px;
            border-radius: 6px;
            margin-bottom: 15px;
            font-size: 0.9em;
        }

        .message.success {
            background: rgba(52, 199, 89, 0.1);
            border: 1px solid #34c759;
            color: #34c759;
        }

        .message.error {
            background: rgba(255, 59, 48, 0.1);
            border: 1px solid #ff3b30;
            color: #ff3b30;
        }

        .no-ships {
            text-align: center;
            padding: 60px 20px;
            color: #666;
            font-size: 1.1em;
        }

        /* Scrollbar Styling */
        ::-webkit-scrollbar {
            width: 10px;
            height: 10px;
        }

        ::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
        }

        ::-webkit-scrollbar-thumb {
            background: #2a3f5f;
            border-radius: 5px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #4a9eff;
        }

        /* Responsive Design */
        @media (max-width: 1024px) {
            .side-panel {
                width: 320px;
            }
            
            .ships-grid {
                grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            }
        }

        @media (max-width: 768px) {
            /* Allow scrolling on mobile */
            html, body {
                overflow-x: hidden;
                overflow-y: auto;
            }
            
            .app-container {
                flex-direction: column;
                overflow: visible;
                height: auto;
            }
            
            .main-panel {
                overflow: visible;
                height: auto;
            }
            
            .ships-container {
                overflow: visible;
                height: auto;
                padding: 10px;
            }
            
            .side-panel {
                width: 100%;
                border-left: none;
                border-top: 1px solid #2a3f5f;
                position: relative;
                height: auto;
            }
            
            .panel-content {
                overflow: visible;
                height: auto;
            }
            
            /* Stack header elements on mobile */
            .app-header {
                flex-wrap: wrap;
                padding: 10px;
            }
            
            .app-title {
                flex: 1 0 100%;
                margin-bottom: 10px;
                text-align: center;
            }
            
            /* Responsive filters */
            .filters-bar {
                padding: 10px;
            }
            
            .filters-bar form {
                display: flex;
                flex-direction: column;
                gap: 10px;
            }
            
            .filters-left, .filters-right {
                width: 100%;
                flex-direction: column;
                gap: 10px;
            }
            
            .filter-group {
                display: flex;
                flex-direction: column;
                margin-bottom: 0;
            }
            
            .filter-group .filter-label {
                display: none; /* Hide all labels on mobile */
            }
            
            .filter-select {
                width: 100%;
                min-width: unset;
                height: 42px; /* Consistent height */
                padding: 8px 12px;
            }
            
            .search-group {
                grid-column: 1 / -1; /* Full width */
                display: flex;
                flex-direction: row; /* Keep on one line */
                gap: 8px;
                margin-bottom: 0;
                align-items: stretch;
            }
            
            .search-group .filter-label {
                display: none; /* Hide search label on mobile */
            }
            
            .search-group > div {
                flex: 1;
                display: flex;
                position: relative;
            }
            
            .search-input {
                width: 100%;
                height: 42px; /* Match dropdown height */
                padding: 8px 12px;
            }
            
            .search-button {
                display: flex !important;
                align-items: center;
                gap: 5px;
                height: 42px; /* Match input height */
                padding: 8px 16px;
                flex-shrink: 0; /* Prevent shrinking */
                white-space: nowrap;
            }
            
            .search-button-text {
                display: inline;
            }
            
            /* Hide Clear Filters on mobile - takes too much space */
            .filters-bar .filter-button {
                display: none;
            }
            
            /* Adjust ship count display */
            .ship-count {
                margin-left: 10px; /* Less margin on mobile */
            }
            
            /* Responsive ship grid */
            .ships-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
                padding: 10px;
            }
            
            .ship-card {
                font-size: 0.9em;
            }
            
            .ship-display {
                height: auto;
                min-height: 150px;
            }
            
            .ship-canvas {
                /* Maintain aspect ratio on mobile - 1.7:1 ratio */
                width: 100% !important;
                max-width: 280px !important;
                height: auto !important;
                aspect-ratio: 1.7 / 1;
            }
            
            /* Form adjustments */
            .form-textarea {
                min-height: 150px;
            }
            
            /* Toast notifications on mobile */
            .toast-container {
                left: 10px;
                right: 10px;
                top: 10px;
            }
            
            .toast {
                max-width: 100%;
                min-width: unset;
            }
            
            /* Pagination mobile */
            .pagination {
                flex-wrap: wrap;
                padding: 10px;
                font-size: 0.9em;
            }
            
            .page-btn {
                padding: 6px 10px;
                font-size: 0.85em;
            }
        }
        
        @media (max-width: 480px) {
            /* Even smaller screens */
            
            /* Fix modal on mobile */
            .preview-window {
                width: 95%;
                height: 95%;
                max-height: none;
            }
            
            .preview-content {
                flex-direction: column;
            }
            
            .preview-left {
                flex: 1;
                padding: 10px;
            }
            
            .preview-canvas {
                max-width: 100%;
                max-height: 300px;
            }
            
            .preview-right {
                width: 100%;
                border-left: none;
                border-top: 1px solid #4a9eff;
                max-height: 200px;
            }
            
            .preview-controls {
                margin-top: 10px;
                padding: 8px;
            }
            
            .preview-btn {
                width: 36px;
                height: 36px;
                font-size: 14px;
            }
            
            .filters-bar {
                grid-template-columns: 1fr; /* Stack everything vertically */
            }
            
            .ships-grid {
                grid-template-columns: 1fr;
                gap: 8px;
            }
            
            .filter-group {
                width: 100%;
            }
            
            .search-button-text {
                display: none; /* Show only icon on very small screens */
            }
            
            .search-button {
                padding: 8px 12px;
            }
            
            .ship-card {
                font-size: 0.85em;
            }
            
            .ship-name {
                font-size: 0.9em;
            }
            
            .ship-author {
                font-size: 0.8em;
            }
            
            .copy-btn {
                width: 32px;
                height: 32px;
                padding: 6px;
                font-size: 12px;
            }
            
            .ship-display {
                height: auto;
                min-height: 160px;
            }
            
            .ship-canvas {
                /* Maintain aspect ratio on mobile - 1.7:1 ratio */
                width: 100% !important;
                max-width: 300px !important;
                height: auto !important;
                aspect-ratio: 1.7 / 1;
            }
        }
