        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', 'Segoe UI', sans-serif;
            background: linear-gradient(135deg, #f36433de 0%, #ebb743 100%);
            padding: 20px;
            min-height: 100vh;
            position: relative;
            overflow-x: hidden;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
            z-index: 0;
            pointer-events: none;
        }

        /* MODAL STYLES */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            z-index: 9999;
            animation: fadeIn 0.3s ease-out;
        }

        .modal-overlay.show {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal {
            background: white;
            border-radius: 24px;
            padding: 40px;
            max-width: 500px;
            width: 90%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: slideUp 0.4s ease-out;
            position: relative;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(30px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .modal-icon {
            width: 80px;
            height: 80px;
            margin: 0 auto 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            font-size: 48px;
        }

        .modal-icon.success {
            background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
            box-shadow: 0 8px 24px rgba(72, 187, 120, 0.3);
        }

        .modal-icon.warning {
            background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
            box-shadow: 0 8px 24px rgba(237, 137, 54, 0.3);
        }

        .modal-icon.error {
            background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
            box-shadow: 0 8px 24px rgba(245, 101, 101, 0.3);
        }

        .modal-title {
            font-size: 28px;
            font-weight: 800;
            text-align: center;
            margin-bottom: 16px;
            color: #2d3748;
        }

        .modal-message {
            font-size: 16px;
            text-align: center;
            color: #4a5568;
            line-height: 1.6;
            margin-bottom: 32px;
        }

        .modal-buttons {
            display: flex;
            gap: 12px;
            justify-content: center;
        }

        .modal-btn {
            padding: 14px 32px;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-family: 'Inter', sans-serif;
        }

        .modal-btn-primary {
            background: linear-gradient(135deg, #E87722 0%, #ff9f4a 100%);
            color: white;
            box-shadow: 0 4px 12px rgba(232, 119, 34, 0.3);
        }

        .modal-btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(232, 119, 34, 0.4);
        }

        .modal-btn-secondary {
            background: #e2e8f0;
            color: #2d3748;
        }

        .modal-btn-secondary:hover {
            background: #cbd5e0;
            transform: translateY(-2px);
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            background: white;
            border-radius: 24px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            overflow: hidden;
            position: relative;
            z-index: 1;
            animation: slideUpMain 0.6s ease-out;
        }

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

        .header {
            background: linear-gradient(135deg, #E87722 0%, #ff9f4a 50%, #E87722 100%);
            background-size: 200% 200%;
            animation: gradientShift 3s ease infinite;
            padding: 50px 40px;
            text-align: center;
            color: white;
            position: relative;
            overflow: hidden;
        }

        @keyframes gradientShift {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        .header::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
            animation: rotate 20s linear infinite;
        }

        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .header-content {
            position: relative;
            z-index: 1;
        }

        .header h1 {
            font-size: 48px;
            font-weight: 800;
            margin-bottom: 12px;
            text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            letter-spacing: -1px;
        }

        .header p {
            font-size: 20px;
            opacity: 0.95;
            font-weight: 500;
        }

        .header-badge {
            display: inline-block;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            padding: 8px 20px;
            border-radius: 20px;
            margin-top: 16px;
            font-size: 14px;
            font-weight: 600;
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .content {
            padding: 50px 40px;
        }

        .alert {
            padding: 18px 24px;
            border-radius: 12px;
            margin-bottom: 25px;
            display: none;
            font-weight: 500;
            animation: slideIn 0.4s ease-out;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .alert-success {
            background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
            border: 2px solid #48bb78;
            color: #22543d;
            display: block;
        }

        .alert-error {
            background: linear-gradient(135deg, #fed7d7 0%, #fc8181 100%);
            border: 2px solid #f56565;
            color: #742a2a;
            display: block;
        }

        .form-section {
            background: linear-gradient(135deg, #f8f9ff 0%, #fff5f0 100%);
            padding: 40px;
            border-radius: 20px;
            margin-bottom: 40px;
            border: 2px solid #E87722;
            box-shadow: 0 4px 20px rgba(232, 119, 34, 0.1);
        }

        .form-section h2 {
            color: #E87722;
            margin-bottom: 30px;
            font-size: 28px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .form-section h2::before {
            content: '✏️';
            font-size: 32px;
        }

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

        .form-group label {
            display: block;
            margin-bottom: 10px;
            font-weight: 600;
            color: #2d3748;
            font-size: 15px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .form-group label::before {
            content: '●';
            color: #E87722;
            font-size: 12px;
        }

        .form-group input,
        .form-group select {
            width: 100%;
            padding: 16px 20px;
            border: 2px solid #e2e8f0;
            border-radius: 12px;
            font-size: 16px;
            transition: all 0.3s;
            font-family: 'Inter', sans-serif;
            background: white;
        }

        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: #E87722;
            box-shadow: 0 0 0 4px rgba(232, 119, 34, 0.1);
            transform: translateY(-2px);
        }

        .form-group input:hover,
        .form-group select:hover {
            border-color: #cbd5e0;
        }

        .form-group small {
            display: block;
            margin-top: 8px;
            color: #718096;
            font-size: 13px;
            font-style: italic;
        }

        .button-group {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 16px;
            margin-top: 35px;
        }

        .btn {
            padding: 20px 18px;
            border: none;
            border-radius: 20px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-family: 'Inter', sans-serif;
            position: relative;
            overflow: hidden;
        }

        .btn::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.3);
            transform: translate(-50%, -50%);
            transition: width 1.5s, height 1.5s;
        }

        .btn:hover::before {
            width: 900px;
            height: 300px;
        }

        .btn span {
            position: relative;
            z-index: 1;
        }

        .btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .btn-primary {
            background: linear-gradient(135deg, #E87722 0%, #ff9f4a 100%);
            color: white;
            box-shadow: 0 6px 20px rgba(232, 119, 34, 0.4);
        }

        .btn-primary:hover:not(:disabled) {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(232, 119, 34, 0.5);
        }

        .btn-primary:active:not(:disabled) {
            transform: translateY(-1px);
        }

        .btn-secondary {
            background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
            color: #2d3748;
        }

        .btn-secondary:hover {
            background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
            transform: translateY(-2px);
        }

        .btn-download {
            background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
            color: white;
            box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
            grid-column: 1 / -1;
        }

        .btn-download:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(72, 187, 120, 0.5);
        }

        .preview-section {
            margin-top: 40px;
            text-align: center;
            background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
            padding: 40px;
            border-radius: 20px;
        }

        .preview-section h2 {
            color: #2d3748;
            margin-bottom: 30px;
            font-size: 28px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }

        .preview-section h2::before {
            content: '👁️';
            font-size: 32px;
        }

        #canvas {
            max-width: 100%;
            border: 4px solid #E87722;
            border-radius: 16px;
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
            display: none;
            transition: all 0.3s;
        }

        #canvas:hover {
            transform: scale(1.02);
            box-shadow: 0 16px 50px rgba(0, 0, 0, 0.2);
        }

        .instructions {
            background: linear-gradient(135deg, #fff5f0 0%, #ffe8d8 100%);
            padding: 30px;
            border-radius: 16px;
            margin-top: 40px;
            border-left: 6px solid #E87722;
            box-shadow: 0 4px 15px rgba(232, 119, 34, 0.1);
        }

        .instructions h3 {
            color: #E87722;
            margin-bottom: 20px;
            font-size: 24px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .instructions h3::before {
            content: '📋';
            font-size: 28px;
        }

        .instructions ol {
            margin-left: 25px;
            counter-reset: item;
            list-style: none;
        }

        .instructions li {
            margin-bottom: 16px;
            line-height: 1.7;
            counter-increment: item;
            position: relative;
            padding-left: 40px;
            font-size: 15px;
        }

        .instructions li::before {
            content: counter(item);
            position: absolute;
            left: 0;
            top: 0;
            background: linear-gradient(135deg, #E87722 0%, #ff9f4a 100%);
            color: white;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 13px;
        }

        .loading {
            display: none;
            text-align: center;
            padding: 25px;
            color: #E87722;
            font-weight: 700;
            font-size: 18px;
            background: linear-gradient(135deg, #fff5f0 0%, #ffe8d8 100%);
            border-radius: 12px;
            margin-top: 20px;
        }

        .loading.show {
            display: block;
            animation: pulse 1.5s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        .loading::before {
            content: '⏳';
            font-size: 32px;
            display: block;
            margin-bottom: 10px;
            animation: spin 2s linear infinite;
        }

        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        footer {
            text-align: center;
            margin-top: 10px;
            color: rgb(255, 252, 252);
            align-items: center;
        }

        @media (max-width: 768px) {
            .button-group {
                grid-template-columns: 1fr;
            }

            .header h1 {
                font-size: 32px;
            }

            .content {
                padding: 30px 20px;
            }

            .form-section {
                padding: 25px 20px;
            }

            .modal {
                padding: 30px 20px;
            }
        }

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