@font-face {
    font-family: 'SF Pro Text Bold';
    src: url('fonts/SFProText-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'TT Commons Medium';
    src: url('fonts/TT\ Commons\ Medium.otf') format('opentype');
}

@font-face {
    font-family: 'TT Commons Regular';
    src: url('fonts/TT\ Commons\ Light.otf') format('opentype');
}

* {
    box-sizing: border-box;
}

body { 
    font-family: 'TT Commons Regular', sans-serif; 
    background: #f8f9fa;
    margin: 0;
    padding: 30px 20px;
    min-height: 100vh;
}

.container { 
    background: white; 
    padding: 35px; 
    border-radius: 16px; 
    box-shadow: 0 2px 12px rgba(0,0,0,0.08); 
    max-width: 1200px; 
    width: 100%; 
    margin: 0 auto;
}

h2 { 
    text-align: center; 
    color: #2d3748; 
    font-family: 'SF Pro Text Bold', sans-serif; 
    margin: 0 0 35px 0;
    font-size: 2.2rem; 
    font-weight: 600;
}

.editor-wrapper { 
    display: grid; 
    grid-template-columns: 1fr 2fr; 
    gap: 40px; 
    align-items: start;
}

.controls { 
    display: flex; 
    flex-direction: column; 
    gap: 18px; 
    background: #f0f4f8; 
    padding: 25px; 
    border-radius: 12px; 
    box-shadow: none;
    border: 1px solid #e2e8f0;
}

label { 
    font-weight: 600; 
    color: #4a5568; 
    font-size: 0.9rem; 
    margin-bottom: 6px;
}

input { 
    padding: 10px 14px; 
    border: 1px solid #cbd5e1; 
    border-radius: 8px; 
    font-size: 0.95rem; 
    transition: all 0.2s ease; 
    background: white;
    color: #2d3748;
}

input::placeholder {
    color: #a0aec0;
}

input:focus { 
    outline: none; 
    border-color: #3b82f6; 
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.05);
    background: #f8fafc;
}

hr { 
    border: none; 
    height: 1px; 
    background: #e2e8f0; 
    margin: 20px 0;
}

.canvas-area { 
    display: flex; 
    justify-content: center; 
    align-items: center;
    background: #f8fafc; 
    border-radius: 12px; 
    box-shadow: none; 
    padding: 20px;
    border: 1px solid #e2e8f0;
    min-height: 280px;
}

canvas { 
    max-width: 100%; 
    height: auto; 
    border: 1px solid #cbd5e1; 
    border-radius: 8px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

canvas:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

button { 
    padding: 12px 22px; 
    background: linear-gradient(135deg, #3b82f6, #2563eb); 
    color: white; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    margin-top: 16px; 
    font-weight: 600; 
    font-size: 0.95rem;
    transition: all 0.2s ease; 
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

button:hover { 
    background: linear-gradient(135deg, #2563eb, #1d4ed8); 
    transform: translateY(-1px); 
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.button-group { 
    display: flex; 
    gap: 10px; 
    margin-top: 12px; 
    flex-wrap: wrap;
}

.bg-btn { 
    margin: 0; 
    flex: 1; 
    background: #e8f1ff; 
    border-radius: 8px; 
    transition: all 0.2s ease; 
    box-shadow: none;
    min-width: 90px;
    font-weight: 500;
    color: #2563eb;
    border: 1px solid #cbd5e1;
    padding: 9px;
    cursor: pointer;
    font-size: 0.9rem;
}

.bg-btn:hover { 
    background: #dce5f5; 
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.bg-btn.active { 
    background: linear-gradient(135deg, #3b82f6, #2563eb); 
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    color: white;
    border-color: #3b82f6;
}

.bg-btn.active:hover { 
    background: linear-gradient(135deg, #2563eb, #1d4ed8); 
    transform: translateY(-1px);
}

/* Responsivitas untuk mobile */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .container {
        padding: 20px;
    }
    
    h2 {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }
    
    .editor-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .controls {
        gap: 14px;
        padding: 18px;
    }
    
    input {
        padding: 9px 12px;
        font-size: 0.9rem;
    }
    
    .canvas-area {
        padding: 15px;
        min-height: 220px;
    }
    
    button {
        padding: 11px 18px;
        font-size: 0.9rem;
    }
    
    .button-group {
        gap: 8px;
        margin-top: 10px;
    }
    
    .bg-btn {
        padding: 8px;
        min-width: 80px;
        font-size: 0.85rem;
    }
}