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

body {
    font-family: 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.demo-notice {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
    padding: 15px 20px;
    text-align: center;
    font-size: 0.95rem;
    margin: 0 auto 20px;
    max-width: 1200px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.demo-notice a {
    color: #0066cc;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid #0066cc;
}

.demo-notice a:hover {
    color: #0052a3;
    border-bottom-color: #0052a3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    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;
    text-align: center;
}

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

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

main {
    padding: 40px;
}

.editor-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

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

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

#text-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

#text-input:focus {
    outline: none;
    border-color: #667eea;
}

.char-count {
    text-align: right;
    font-size: 0.85rem;
    color: #666;
}

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

.template-btn {
    padding: 12px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}

.template-btn:hover {
    background: #f5f5f5;
    border-color: #667eea;
}

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

.style-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s;
}

.checkbox-label:hover {
    background: #f5f5f5;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-label span {
    font-size: 0.95rem;
    color: #333;
}

.color-picker {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-picker input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}

.color-picker input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.95rem;
}

.color-picker input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.position-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.position-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.position-input label {
    font-weight: normal;
    font-size: 0.9rem;
    min-width: 80px;
}

.position-input input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.position-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.position-input input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.position-input span {
    min-width: 30px;
    text-align: right;
    font-weight: bold;
    color: #667eea;
}

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

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

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

.preview-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.preview-section h3 {
    font-size: 1.3rem;
    color: #333;
}

.canvas-container {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

#preview-canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.copyright-section {
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.copyright-section h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.copyright-section p {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.social-link.youtube {
    background: #FF0000;
    color: white;
}

.social-link.youtube:hover {
    background: #CC0000;
}

.social-link.twitter {
    background: #000000;
    color: white;
}

.social-link.twitter:hover {
    background: #333333;
}

.social-link .icon {
    font-size: 1.2rem;
}

.site-copyright {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #999;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 0.95rem;
    }
    
    main {
        padding: 20px;
    }
    
    .editor-section {
        grid-template-columns: 1fr;
    }
    
    .template-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .template-buttons {
        grid-template-columns: 1fr;
    }
}
