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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

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

h2 {
    color: #28a745;
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 500;
    line-height: 1.4;
}

.upload-section {
    text-align: center;
    margin-bottom: 30px;
}

#imageInput {
    display: none;
}

.upload-btn {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
}

.upload-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.watermark-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

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

.control-group label {
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
}

.control-group input,
.control-group select {
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.control-group input:focus,
.control-group select:focus {
    outline: none;
    border-color: #667eea;
}

.control-group input[type="range"] {
    padding: 0;
}

.control-group span {
    font-size: 0.9rem;
    color: #666;
    margin-top: -5px;
}

.canvas-section {
    text-align: center;
    margin-bottom: 30px;
}

#canvas {
    max-width: 100%;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-buttons button {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#downloadBtn {
    background: #28a745;
    color: white;
}

#downloadBtn:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

#resetBtn {
    background: #dc3545;
    color: white;
}

#resetBtn:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2rem;
    }

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