* {
    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%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 2rem;
}

.instructions {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.canvas-container {
    border: 2px dashed #ccc;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #fafafa;
    cursor: crosshair;
}

#signature-pad {
    display: block;
    width: 100%;
    height: 250px;
    touch-action: none;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    text-decoration: none;
    display: inline-flex;
    margin-top: 15px;
}

.options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.options label {
    color: #555;
    font-size: 0.9rem;
}

#stroke-color {
    width: 40px;
    height: 35px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

#stroke-width {
    width: 100px;
    cursor: pointer;
}

.preview-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
    text-align: center;
}

.preview-section h2 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

#signature-preview {
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.hidden {
    display: none;
}

.icon {
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .options {
        flex-direction: column;
        gap: 10px;
    }
}
