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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 1000px;
    width: 100%;
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

header {
    margin-bottom: 20px;
}

h1 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #666;
    font-size: 0.95rem;
}

canvas {
    border: 3px solid #333;
    border-radius: 10px;
    cursor: crosshair;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.tools {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.tool-group {
    background: #f0f0f0;
    padding: 10px 18px;
    border-radius: 40px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

label {
    font-weight: bold;
    color: #555;
    font-size: 0.95rem;
}

input[type="color"] {
    width: 50px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

input[type="color"]:hover {
    transform: scale(1.05);
}

input[type="range"] {
    width: 130px;
    cursor: pointer;
}

.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-clear {
    background: #ff6b6b;
}

.btn-clear:hover {
    background: #ff5252;
}

.btn-save {
    background: #4ecdc4;
}

.btn-save:hover {
    background: #45b7aa;
}

.size-value {
    background: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    min-width: 45px;
    font-size: 0.9rem;
}

.stats {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.stat {
    font-size: 0.85rem;
    color: #666;
}

.stat-label {
    font-weight: bold;
    color: #333;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .tools {
        gap: 10px;
    }
    
    .tool-group {
        padding: 8px 12px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    input[type="range"] {
        width: 100px;
    }
}

@media (max-width: 600px) {
    .tools {
        flex-direction: column;
    }
    
    .tool-group {
        width: 100%;
        justify-content: center;
    }
}
