@font-face {
    font-family: 'Rodin';
    src: url('fonts/RodinPRO.otf') format('opentype');
}

@font-face {
    font-family: 'Yuruka';
    src: url('fonts/yuruka.ttf') format('truetype');
}

* {
    box-sizing: border-box;
}

body {

    background: linear-gradient(135deg, #e9d30d 0%, #0ab9e1 100%);
    
    font-family: 'Montserrat', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 10px;
    background-attachment: fixed;
}

#title {
    font-family: 'Yuruka', sans-serif;
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 15px;
}

.container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 280px;
    flex-shrink: 0;
}

.preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

canvas {
    /* border-radius: 50%; */
    border: 1px dashed #ccc;
    width: 600px;
    height: 600px;
    cursor: grab;
    max-width: 100%;
    max-height: 600px;
    font-family: 'Rodin', sans-serif;
}

canvas:active {
    cursor: grabbing;
}

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

label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

button, input[type="file"], input[type="range"] {
    width: 100%;
    cursor: pointer;
}

input[type="file"], button {
    padding: 12px;
    border-radius: 100px;
    border: 1px solid #ccc;
    font-size: 1em;
}

button {
    font: 600 1em 'Montserrat', sans-serif;
    background-color: #78EEDD;
    color: #555577;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s, transform 0.1s;
}

button:hover {
    background-color: #68ccbd;
}

button:active {
    transform: translateY(2px);
}

#download-btn {
    background-color: #ec93b1;
}

#download-btn:hover {
    background-color: #c27f95;
}

input[type="range"] {
    padding: 10px 0;
    accent-color: #78EEDD;
}

@media (max-width: 1024px) {
    .container {
        gap: 20px;
        padding: 20px;
    }
    
    canvas {
        width: 350px;
        height: 350px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 5px;
        align-items: flex-start;
        background-attachment: scroll;
    }
    
    .container {
        flex-direction: column;
        align-items: center;
        padding: 15px;
        gap: 20px;
        margin: 5px 0;
    }
    
    .controls {
        width: 100%;
        max-width: 400px;
        order: 2;
    }
    
    .preview {
        order: 1;
        width: 100%;
    }
    
    canvas {
        width: 90vw;
        height: 90vw;
        max-width: 350px;
        max-height: 350px;
    }
    
    #title {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
        gap: 15px;
    }
    
    canvas {
        width: 85vw;
        height: 85vw;
        max-width: 300px;
        max-height: 300px;
    }
}