@font-face {
    font-family: 'Purrfect';
    src: url('fonts/0214-LNTH-Purrfect.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    color: #333;
    line-height: 1.5;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: #2c3e50;
}

header p {
    font-size: 0.9rem;
    color: #666;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.controls-panel {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    order: 2;
}

.preview-panel {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    order: 1;
}

.control-group {
    margin-bottom: 20px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 0.9rem;
}

.file-input {
    display: none;
}

.file-label {
    display: block;
    padding: 15px 20px;
    background: #3498db;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    transition: background-color 0.2s ease;
    font-size: 1rem;
}

.file-label:hover {
    background: #2980b9;
}

.file-label:active {
    transform: scale(0.98);
}

.text-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    font-family: 'Purrfect', sans-serif;
}

.text-input:focus {
    outline: none;
    border-color: #3498db;
}

.slider {
    width: 70%;
    margin-right: 15px;
    height: 8px;
    background: #e1e8ed;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    vertical-align: middle;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#fontSizeValue, #opacityValue {
    font-weight: 600;
    color: #3498db;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    min-width: 50px;
    display: inline-block;
    text-align: center;
}

.position-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.position-grid input[type="radio"] {
    display: none;
}

.position-btn {
    padding: 12px 8px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    background: white;
    font-size: 0.85rem;
}

.position-btn:hover {
    border-color: #3498db;
}

.position-grid input[type="radio"]:checked + .position-btn {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #229954;
}

.btn-success:active:not(:disabled) {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.canvas-container {
    position: relative;
    width: 100%;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 2px dashed #ddd;
}

#canvas {
    max-width: 100%;
    max-height: 400px;
    border-radius: 6px;
    display: none;
}

.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 250px;
}

.placeholder-content {
    text-align: center;
    color: #999;
}

.placeholder-content span {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.placeholder-content p {
    font-size: 1rem;
    font-weight: 500;
}

/* Tablet và Desktop */
@media (min-width: 768px) {
    .container {
        max-width: 1000px;
        padding: 20px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .main-content {
        display: grid;
        grid-template-columns: 300px 1fr;
        gap: 25px;
        align-items: start;
    }
    
    .controls-panel {
        order: 1;
        padding: 25px;
    }
    
    .preview-panel {
        order: 2;
        padding: 25px;
    }
    
    .canvas-container {
        min-height: 400px;
    }
    
    #canvas {
        max-height: 500px;
    }
    
    .placeholder {
        height: 400px;
    }
    
    .position-grid {
        gap: 10px;
    }
    
    .position-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .btn {
        width: auto;
        padding: 12px 24px;
        display: inline-block;
    }
}

/* Desktop lớn */
@media (min-width: 1024px) {
    .main-content {
        grid-template-columns: 350px 1fr;
        gap: 30px;
    }
    
    .controls-panel {
        padding: 30px;
    }
} 