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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.language-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lang-btn.active {
    background: white;
    color: #667eea;
    border-color: white;
}

main {
    padding: 40px 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.type-btn {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.type-btn:hover {
    background: #eeeeee;
}

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

.type-btn svg {
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.hidden {
    display: none;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

input[type="text"],
input[type="url"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    margin-bottom: 15px;
}

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

textarea {
    resize: vertical;
    min-height: 100px;
}

.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.option-group label {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.output-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-display {
    background: #f9f9f9;
    border: 2px dashed #e0e0e0;
    border-radius: 15px;
    padding: 40px;
    min-height: 300px;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.placeholder {
    color: #999;
    font-size: 1.1rem;
    text-align: center;
}

#qrcode {
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrcode canvas,
#qrcode img {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.download-controls {
    display: flex;
    gap: 15px;
    width: 100%;
}

.download-controls.hidden {
    display: none;
}

.download-btn {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.download-btn.secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

footer {
    background: #f5f5f5;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .type-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .options {
        grid-template-columns: 1fr;
    }
    
    .qr-display {
        min-width: 250px;
        min-height: 250px;
        padding: 20px;
    }
    
    .download-controls {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .type-btn {
        font-size: 0.8rem;
        padding: 10px;
    }
    
    .type-btn svg {
        width: 16px;
        height: 16px;
    }
}