* {
    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: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.header {
    grid-column: 1 / -1;
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.controls {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.preset-backgrounds {
    margin-top: 15px;
}

.preset-backgrounds p {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.background-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.bg-option {
    padding: 10px;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.bg-option:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.bg-option.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

button {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

#downloadBtn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

#downloadBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(17, 153, 142, 0.4);
}

.preview-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.quote-canvas {
    width: 500px;
    height: 500px;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.quote-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px 40px;
    color: white;
    max-width: 100%;
}

.quote-text {
    font-size: 32px;
    line-height: 1.4;
    margin-bottom: 30px;
    font-weight: 300;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    letter-spacing: 0.5px;
}

.quote-author {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.9;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
    letter-spacing: 1px;
}

/* Preset background styles */
.quote-canvas.nature1 {
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
                      url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%234a7c59;stop-opacity:1" /><stop offset="100%" style="stop-color:%23315f3e;stop-opacity:1" /></linearGradient></defs><rect width="1000" height="1000" fill="url(%23grad1)"/><circle cx="200" cy="200" r="50" fill="%23638f5c" opacity="0.3"/><circle cx="800" cy="300" r="80" fill="%235a8a4d" opacity="0.2"/><circle cx="600" cy="700" r="60" fill="%236b9655" opacity="0.25"/></svg>');
}

.quote-canvas.nature2 {
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
                      url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><linearGradient id="grad2" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23134e5e;stop-opacity:1" /><stop offset="100%" style="stop-color:%2371b280;stop-opacity:1" /></linearGradient></defs><rect width="1000" height="1000" fill="url(%23grad2)"/></svg>');
}

.quote-canvas.abstract1 {
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
                      url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><linearGradient id="grad3" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23667eea;stop-opacity:1" /><stop offset="100%" style="stop-color:%23764ba2;stop-opacity:1" /></linearGradient></defs><rect width="1000" height="1000" fill="url(%23grad3)"/></svg>');
}

.quote-canvas.gradient1 {
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
                      linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

/* Range input styling */
input[type="range"] {
    width: 70%;
    margin-right: 10px;
}

#opacityValue {
    font-weight: bold;
    color: #667eea;
}

/* Color input styling */
input[type="color"] {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .quote-canvas {
        width: 100%;
        height: 400px;
    }
    
    .quote-text {
        font-size: 24px;
    }
    
    .quote-author {
        font-size: 16px;
    }
    
    .button-group {
        flex-direction: column;
    }
}
