/* QRコード生成ツール専用スタイル */

:root {
    --container-max: 1200px;
    --radius-lg: 12px;
    --primary-grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-white: #ffffff;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-primary: 0 4px 20px rgba(102, 126, 234, 0.3);
}

body {
    background-color: var(--bg-white);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: var(--primary-grad);
    color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-primary);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

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

.tool-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    border: 1px solid #e2e8f0;
}

/* セクション共通スタイル */
.input-section,
.result-section,
.presets-section,
.info-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.input-section {
    background: #f8f9fa;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.input-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: all 0.2s ease;
    outline: none;
}

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

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group select,
.option-group input[type="file"],
.option-group input[type="color"] {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

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

.option-group input[type="color"] {
    height: 50px;
    cursor: pointer;
    border-radius: var(--radius-lg);
}

.color-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-input-group select,
.color-input-group input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

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

.color-input-group input[type="text"] {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

/* ボタンスタイル */
.generate-btn {
    width: 100%;
    background: var(--primary-grad);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-primary);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

.generate-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 結果セクション */
.result-section {
    display: none;
    text-align: center;
}

.qr-container {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    display: inline-block;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
    border: 1px solid #e2e8f0;
}

.qr-container img,
.qr-container canvas {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

.download-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.download-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.png-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.png-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.svg-btn {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.svg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.4);
}

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

/* プリセットセクション */
.presets-section h3 {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.preset-item {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
    border: 1px solid #e2e8f0;
}

.preset-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.preset-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.preset-desc {
    font-size: 0.9rem;
    color: #718096;
    word-break: break-all;
    line-height: 1.4;
}

/* 情報セクション */
.info-section {
    background: linear-gradient(135deg, #e6fffa 0%, #f0fff4 100%);
    border: 1px solid #68d391;
}

.info-section h3 {
    color: #2f855a;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-section p {
    color: #2f855a;
    line-height: 1.6;
    margin: 0;
}

/* メッセージスタイル */
.error-message {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    border: 1px solid #fc8181;
    border-radius: var(--radius-lg);
    padding: 1rem;
    color: #c53030;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 1rem 0;
    display: none;
}

.success-message {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    border: 1px solid #68d391;
    border-radius: var(--radius-lg);
    padding: 1rem;
    color: #2f855a;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 1rem 0;
    display: none;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header {
        margin-bottom: 2rem;
        padding: 1.5rem 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tool-card {
        padding: 1.5rem;
    }
    
    .input-section,
    .result-section,
    .presets-section,
    .info-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .download-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .download-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .preset-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    header {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    .tool-card {
        padding: 1rem;
    }
    
    .input-section,
    .result-section,
    .presets-section,
    .info-section {
        padding: 1rem;
    }
}