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

body {
    font-family: 'Chakra Petch', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #F3F7FA;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    color: #374151;
}

.profile-link {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.profile-link:hover {
    transform: scale(1.1);
}

.profile-picture {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    transition: all 0.3s ease;
}

.profile-picture:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    padding-top: 100px;
}

.header {
    text-align: center;
    margin-bottom: 60px;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
}

.main-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.control-group input[type="text"],
.control-group textarea,
.control-group select,
.control-group input[type="number"],
.control-group input[type="file"] {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: 'Chakra Petch', sans-serif;
}

.control-group input:focus,
.control-group textarea:focus,
.control-group select:focus {
    outline: none;
    border-color: #3b82f6;
}

.control-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.color-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
}

.color-input-group input[type="text"] {
    flex: 1;
}

.preview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.canvas-container {
    background: 
        linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
        linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
        linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.button-group {
    display: flex;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
}

button {
    flex: 1;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Chakra Petch', sans-serif;
    min-width: 120px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #f8fafc;
    color: #1f2937;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #d1d5db;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.presets-section {
    grid-column: 1 / -1;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.presets-section h3 {
    margin-bottom: 15px;
    color: #1f2937;
    font-weight: 700;
}

.preset-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    display: none;
}

.file-input-label {
    display: block;
    padding: 10px;
    border: 2px dashed #3b82f6;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #3b82f6;
    font-weight: 600;
}

.file-input-label:hover {
    background: #eff6ff;
    border-color: #2563eb;
}

.small-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .profile-link {
        top: 15px;
        left: 15px;
    }
    
    .profile-picture {
        width: 50px;
        height: 50px;
        border-width: 2px;
    }

    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .container {
        padding-top: 80px;
    }

    .main-content {
        grid-template-columns: 1fr;
        padding: 30px 20px;
    }

    .preset-controls {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .main-content {
        padding: 20px 15px;
    }
}