        /* Custom variables for this app */
        :root {
            --primary-hover: #4338ca;
            --success: #10b981;
            --danger: #ef4444;
        }

        body {
            font-family: 'Outfit', 'Noto Sans JP', sans-serif !important;
        }

        /* App container layouts */
        .main-container {
            max-width: 768px;
            width: 100%;
            margin: 0 auto;
            padding: 0 0 60px 0;
            flex-grow: 1;
        }

        

        

        

        

        

        

        /* Lang switcher control */
        

        

        

        

        /* Hero Section */
        

        

        

        /* Main Container */
        

        .card {
            background-color: var(--container-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 32px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .card:hover {
            border-color: rgba(79, 70, 229, 0.25);
            box-shadow: 0 12px 30px -10px rgba(79, 70, 229, 0.12);
        }

        /* Drop Zone */
        .drop-zone {
            border: 2px dashed #cbd5e1;
            border-radius: 8px;
            padding: 48px 24px;
            text-align: center;
            cursor: pointer;
            background-color: #fafafa;
            transition: all 0.2s ease-in-out;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 16px;
            outline: none;
        }

        .drop-zone:hover, .drop-zone.dragover {
            border-color: var(--primary);
            background-color: #fcfbfe;
        }

        .icon-container {
            width: 56px;
            height: 56px;
            background-color: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary);
            box-shadow: 0 2px 4px rgba(0,0,0,0.02);
            transition: transform 0.2s ease;
        }

        .drop-zone:hover .icon-container {
            transform: translateY(-3px);
        }

        .drop-zone-text {
            font-size: 13.5px;
            font-weight: 700;
            color: #374151;
        }

        .drop-zone-subtext {
            font-size: 11px;
            color: var(--text-muted);
            font-weight: 300;
        }

        .file-input {
            display: none;
        }

        /* Alert Box */
        .alert-box {
            margin-top: 24px;
            background-color: #fafafa;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 16px 18px;
            display: flex;
            gap: 12px;
            align-items: flex-start;
        }

        .alert-icon {
            font-size: 16px;
            line-height: 1.2;
            flex-shrink: 0;
        }

        .alert-content {
            font-size: 12px;
            color: var(--text-muted);
            line-height: 1.6;
            font-weight: 300;
        }

        .alert-title {
            font-weight: 700;
            color: #374151;
            margin-bottom: 4px;
        }

        /* Error Box */
        .error-box {
            margin-top: 24px;
            background-color: #fef2f2;
            border: 1px solid #fee2e2;
            border-radius: 8px;
            padding: 16px 18px;
            display: none;
            gap: 12px;
            align-items: flex-start;
            animation: fadeIn 0.2s ease;
        }

        .error-content {
            font-size: 12px;
            color: #b91c1c;
            line-height: 1.6;
        }

        /* Converter View (After drop) */
        .converter-view {
            display: none;
            flex-direction: column;
            gap: 24px;
            animation: fadeIn 0.3s ease;
        }

        .file-info {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-bottom: 16px;
            border-bottom: 1px solid var(--border-color);
        }

        .file-details {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .file-name {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-color);
            word-break: break-all;
        }

        .file-size {
            font-size: 11px;
            color: var(--text-muted);
        }

        .btn-reset {
            background: none;
            border: 1px solid #d1d5db;
            padding: 6px 12px;
            font-size: 12px;
            border-radius: 6px;
            cursor: pointer;
            color: #4b5563;
            font-weight: 500;
            transition: all 0.2s;
        }

        .btn-reset:hover {
            background-color: #f9fafb;
            border-color: #9ca3af;
            color: var(--text-color);
        }

        /* Preview Area */
        .preview-area {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            background-color: #fafafa;
            border: 1px solid #f3f4f6;
            border-radius: 8px;
            padding: 24px;
            min-height: 200px;
            justify-content: center;
            position: relative;
        }

        .preview-canvas {
            max-width: 100%;
            max-height: 340px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
            background-color: #fff;
            border-radius: 4px;
            display: none;
        }

        .preview-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            color: var(--text-muted);
        }

        .preview-title {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
            align-self: flex-start;
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }

        /* Optimization Toggle Styling */
        .optimization-settings {
            background-color: #fafafa;
            border: 1px solid #f3f4f6;
            border-radius: 8px;
            padding: 16px 18px;
        }
        
        .switch-container {
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            gap: 16px;
        }

        .switch-label {
            display: flex;
            flex-direction: column;
            gap: 2px;
            flex-grow: 1;
        }

        .switch-title {
            font-size: 12.5px;
            font-weight: 700;
            color: var(--text-color);
        }

        .switch-desc {
            font-size: 11px;
            color: var(--text-muted);
            line-height: 1.5;
            font-weight: 300;
        }

        .switch-container input {
            display: none;
        }

        .switch-slider {
            width: 42px;
            height: 22px;
            background-color: #cbd5e1;
            border-radius: 99px;
            position: relative;
            transition: background-color 0.2s;
            flex-shrink: 0;
        }

        .switch-slider::before {
            content: "";
            position: absolute;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background-color: #ffffff;
            top: 3px;
            left: 3px;
            transition: transform 0.2s;
            box-shadow: 0 1px 2px rgba(0,0,0,0.08);
        }

        .switch-container input:checked + .switch-slider {
            background-color: var(--primary);
        }

        .switch-container input:checked + .switch-slider::before {
            transform: translateX(20px);
        }

        /* Progress Ring/Bar */
        .loading-container {
            display: none;
            flex-direction: column;
            align-items: center;
            gap: 12px;
        }

        .spinner {
            width: 32px;
            height: 32px;
            border: 2px solid #e5e7eb;
            border-top: 2px solid var(--primary);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        .loading-text {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-muted);
        }

        /* Action Buttons */
        .action-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
        }

        @media (max-width: 500px) {
            .action-grid {
                grid-template-columns: 1fr;
            }
        }

        .btn-download {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 20px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
            text-decoration: none;
        }

        .btn-jpg {
            background-color: var(--primary);
            color: #ffffff;
        }

        .btn-jpg:hover {
            background-color: var(--primary-hover);
            transform: translateY(-0.5px);
            box-shadow: 0 4px 12px rgba(79, 70, 229, 0.18);
        }

        .btn-pdf {
            background-color: var(--success);
            color: #ffffff;
        }

        .btn-pdf:hover {
            background-color: #059669;
            transform: translateY(-0.5px);
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.18);
        }

        .btn-download-secondary {
            background-color: #ffffff;
            border: 1px solid #d1d5db;
            color: #4b5563;
        }

        .btn-download-secondary:hover:not(:disabled) {
            background-color: #f9fafb;
            border-color: #9ca3af;
            color: #111827;
        }

        .btn-download:disabled, .btn-download.disabled {
            background-color: #e5e7eb;
            color: #9ca3af;
            cursor: not-allowed;
            transform: none !important;
            box-shadow: none !important;
        }

        /* Toast */
        

        

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

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

        /* Files List Styles */
        .files-list-container {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-bottom: 24px;
            max-height: 240px;
            overflow-y: auto;
            padding-right: 4px;
            width: 100%;
        }

        .file-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px;
            background-color: #fafafa;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .file-row:hover {
            border-color: rgba(79, 70, 229, 0.3);
            background-color: #fcfbfe;
        }

        .file-row.active {
            border-color: var(--primary);
            background-color: var(--primary-light);
        }

        .file-row-details {
            display: flex;
            flex-direction: column;
            gap: 2px;
            flex-grow: 1;
            min-width: 0;
            margin-right: 12px;
        }

        .file-row-name {
            font-size: 13px;
            font-weight: 700;
            color: var(--text-color);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            text-align: left;
        }

        .file-row-meta {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 11px;
            color: var(--text-muted);
        }

        .badge-loading {
            color: var(--primary);
            font-weight: 600;
        }

        .badge-ready {
            color: var(--success);
            font-weight: 600;
        }

        .badge-error {
            color: var(--danger);
            font-weight: 600;
        }

        .file-row-actions {
            display: flex;
            gap: 6px;
            flex-shrink: 0;
        }

        .row-btn {
            padding: 4px 10px;
            font-size: 10px;
            font-weight: 700;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.15s;
            border: none;
            color: #ffffff;
        }

        .btn-jpg-small {
            background-color: var(--primary);
        }

        .btn-jpg-small:hover:not(:disabled) {
            background-color: var(--primary-hover);
        }

        .btn-pdf-small {
            background-color: var(--success);
        }

        .btn-pdf-small:hover:not(:disabled) {
            background-color: #059669;
        }

        .row-btn:disabled {
            background-color: #e5e7eb;
            color: #9ca3af;
            cursor: not-allowed;
        }
