* {
    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;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    backdrop-filter: blur(10px);
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3em;
    color: #2c3e50;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
    font-size: 1.2em;
    color: #7f8c8d;
    font-weight: 300;
}

.controls {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.generate-btn, .download-btn {
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.generate-btn {
    background: linear-gradient(45deg, #3498db, #2ecc71);
    color: white;
}

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

.download-btn {
    background: linear-gradient(45deg, #e74c3c, #f39c12);
    color: white;
}

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

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

.control-group label {
    font-weight: 600;
    color: #34495e;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group input[type="range"] {
    width: 100px;
}

.control-group select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.9em;
    background: white;
}

.control-group input[type="checkbox"] {
    margin: 0;
    transform: scale(1.2);
}

#complexityValue {
    font-weight: bold;
    color: #3498db;
}

.flag-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

#flagCanvas {
    border: 4px solid #34495e;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    background: white;
    max-width: 100%;
    height: auto;
}

.flag-info {
    background: rgba(255, 255, 255, 0.7);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.flag-info h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5em;
}

#flagDescription {
    color: #5d6d7e;
    font-size: 1.1em;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .controls {
        flex-direction: column;
        gap: 15px;
    }
    
    #flagCanvas {
        max-width: 100%;
    }
}