        * {
            box-sizing: border-box;
            user-select: none;
        }
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #eef2f7;
            margin: 0;
            padding: 20px;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .container {
            max-width: 1400px;
            width: 100%;
            background: white;
            border-radius: 28px;
            box-shadow: 0 20px 35px -12px rgba(0,0,0,0.2);
            padding: 24px 28px 32px;
        }
        h1 {
            font-size: 1.6rem;
            margin: 0 0 5px 0;
            color: #1e293b;
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }
        .sub {
            color: #475569;
            border-left: 4px solid #3b82f6;
            padding-left: 14px;
            margin: 8px 0 24px 0;
            font-size: 0.9rem;
        }
        .upload-area {
            background: #f8fafc;
            border: 2px dashed #cbd5e1;
            border-radius: 24px;
            padding: 24px;
            text-align: center;
            margin-bottom: 24px;
            cursor: pointer;
            transition: 0.2s;
        }
        .upload-area:hover {
            background: #f1f5f9;
            border-color: #3b82f6;
        }
        .btn {
            background: #3b82f6;
            border: none;
            padding: 10px 24px;
            border-radius: 40px;
            font-weight: 600;
            color: white;
            cursor: pointer;
            transition: 0.2s;
            font-size: 0.85rem;
        }
        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        .btn-danger {
            background: #ef4444;
        }
        .btn-danger:hover {
            background: #dc2626;
        }
        .btn-success {
            background: #10b981;
        }
        .btn-success:hover {
            background: #059669;
        }
        .btn-outline {
            background: white;
            border: 1px solid #cbd5e1;
            color: #1e293b;
        }
        .btn-outline:hover {
            background: #f1f5f9;
        }
        .toolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            justify-content: space-between;
            align-items: center;
            background: #f9f9fb;
            padding: 12px 20px;
            border-radius: 60px;
            margin-bottom: 20px;
        }
        .control-group {
            display: flex;
            gap: 12px;
            align-items: center;
            flex-wrap: wrap;
        }
        select, .btn-small {
            padding: 8px 16px;
            border-radius: 32px;
            border: 1px solid #cbd5e1;
            background: white;
            font-weight: 500;
            cursor: pointer;
        }
        .angle-control {
            display: flex;
            gap: 8px;
            align-items: center;
            background: #eef2ff;
            padding: 6px 16px;
            border-radius: 40px;
        }
        .angle-value {
            font-weight: bold;
            min-width: 55px;
            text-align: center;
            background: white;
            padding: 4px 10px;
            border-radius: 32px;
        }
        .editor-panel {
            display: flex;
            flex-wrap: wrap;
            gap: 28px;
        }
        .canvas-container {
            flex: 2;
            min-width: 280px;
            background: #1e1e2a;
            border-radius: 24px;
            padding: 16px;
            position: relative;
        }
        .canvas-wrapper {
            position: relative;
            display: flex;
            justify-content: center;
            background: #2d2d3a;
            border-radius: 12px;
            overflow: auto;
        }
        #imageCanvas {
            max-width: 100%;
            height: auto;
            background: #2d2d3a;
            border-radius: 12px;
            cursor: crosshair;
            display: block;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }
        .corner-controls {
            margin-top: 16px;
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
        }
        .result-area {
            flex: 1.2;
            min-width: 260px;
            background: #fefce8;
            border-radius: 24px;
            padding: 18px;
            border: 1px solid #e2e8f0;
        }
        .result-title {
            font-weight: 700;
            margin-bottom: 14px;
            font-size: 1.2rem;
        }
        .preview-box {
            background: #e2e8f0;
            border-radius: 16px;
            display: flex;
            justify-content: center;
            margin: 16px 0;
            border: 1px solid #cbd5e1;
            min-height: 200px;
            align-items: center;
            overflow: hidden;
        }
        #resultImage {
            max-width: 100%;
            max-height: 280px;
            object-fit: contain;
        }
        .save-options {
            display: flex;
            gap: 12px;
            margin: 18px 0 8px;
            align-items: center;
            flex-wrap: wrap;
        }
        .badge {
            background: #e6f0ff;
            color: #1e40af;
            border-radius: 32px;
            padding: 4px 12px;
            font-size: 0.75rem;
        }
        .info-text {
            font-size: 12px;
            color: yellow;
            margin-top: 12px;
        }
        .info-teks {
            font-size: 12px;
            color: black;
            margin-top: 12px;
        }
        footer {
            font-size: 0.7rem;
            text-align: center;
            margin-top: 28px;
            color: #5b6e8c;
        }
        button:active { transform: scale(0.97); }
        .loading-spinner {
            display: inline-block;
            width: 16px;
            height: 16px;
            border: 2px solid #fff;
            border-radius: 50%;
            border-top-color: transparent;
            animation: spin 0.6s linear infinite;
            margin-right: 8px;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .reset-buttons {
            display: flex;
            gap: 10px;
            margin-left: auto;
        }
        hr {
            margin: 16px 0;
            border-color: #e2e8f0;
        }