* {
    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, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    padding: 40px 0 20px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #00d4ff, #7b2ff7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: #a0a0a0;
    font-size: 1.1rem;
}

header strong {
    color: #00d4ff;
}

/* 広告エリア */
.ad-container {
    text-align: center;
    margin: 20px 0;
}

.ad-placeholder {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed #444;
    border-radius: 8px;
    padding: 20px;
    color: #666;
    font-size: 0.85rem;
    display: inline-block;
}

.ad-top .ad-placeholder,
.ad-bottom .ad-placeholder {
    width: 728px;
    max-width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-middle .ad-placeholder {
    width: 300px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #444;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.05);
}

.upload-icon {
    width: 60px;
    height: 60px;
    color: #00d4ff;
    margin-bottom: 20px;
}

.upload-content p {
    color: #ccc;
    margin-bottom: 10px;
}

.upload-hint {
    color: #666 !important;
    font-size: 0.9rem;
}

.upload-button {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(90deg, #00d4ff, #7b2ff7);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease;
    margin: 15px 0;
}

.upload-button:hover {
    transform: scale(1.05);
}

.file-info {
    color: #666 !important;
    font-size: 0.85rem;
    margin-top: 15px;
}

/* Preview Area */
.preview-area {
    margin-top: 30px;
}

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

@media (max-width: 768px) {
    .preview-container {
        grid-template-columns: 1fr;
    }

    .ad-top .ad-placeholder,
    .ad-bottom .ad-placeholder {
        width: 100%;
        height: auto;
        min-height: 60px;
    }
}

.preview-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.preview-box h3 {
    margin-bottom: 15px;
    color: #00d4ff;
    font-size: 1rem;
}

.preview-box img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    object-fit: contain;
}

.result-placeholder {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #444;
    border-radius: 8px;
    color: #666;
}

.image-info {
    margin-top: 10px;
    color: #888;
    font-size: 0.85rem;
}

/* Options */
.options {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-group label {
    color: #ccc;
    cursor: pointer;
}

.scale-buttons {
    display: flex;
    gap: 10px;
}

.scale-btn {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scale-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.scale-btn.active {
    background: linear-gradient(90deg, #00d4ff, #7b2ff7);
    border-color: transparent;
}

/* Buttons */
.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.btn {
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(90deg, #00d4ff, #7b2ff7);
    color: #fff;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid #444;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-success {
    background: linear-gradient(90deg, #00c853, #00e676);
    color: #fff;
    text-decoration: none;
    display: inline-block;
}

.btn-success:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 200, 83, 0.4);
}

.download-area {
    text-align: center;
    margin-top: 20px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    color: #ccc;
}

.loading-hint {
    color: #666 !important;
    font-size: 0.85rem;
    margin-top: 10px;
}

/* Error */
.error {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid #ff3b30;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-top: 20px;
}

.error p {
    color: #ff6b6b;
    margin-bottom: 20px;
}

/* アフィリエイトセクション */
.affiliate-section {
    margin: 50px 0;
    text-align: center;
}

.affiliate-section h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #fff;
}

.affiliate-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .affiliate-cards {
        grid-template-columns: 1fr;
    }
}

.affiliate-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 30px 20px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
}

.affiliate-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #00d4ff;
    transform: translateY(-5px);
}

.affiliate-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.affiliate-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.affiliate-card p {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.affiliate-cta {
    color: #00d4ff;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 使い方セクション */
.how-to-section {
    margin: 50px 0;
    text-align: center;
}

.how-to-section h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #fff;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .steps {
        grid-template-columns: 1fr;
    }
}

.step {
    text-align: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(90deg, #00d4ff, #7b2ff7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 15px;
}

.step h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.step p {
    color: #999;
    font-size: 0.9rem;
}

/* FAQセクション */
.faq-section {
    margin: 50px 0;
}

.faq-section h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
    color: #fff;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-item summary {
    padding: 20px;
    cursor: pointer;
    font-weight: 600;
    color: #fff;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: #00d4ff;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    padding: 0 20px 20px;
    color: #999;
    line-height: 1.6;
}

/* おすすめセクション */
.recommend-section {
    margin: 50px 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 30px;
}

.recommend-icon {
    color: #ff9900;
    margin-bottom: 15px;
}

.recommend-section h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #fff;
}

.recommend-section p {
    color: #999;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.recommend-link {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(90deg, #ff9900, #ffad33);
    color: #000;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.recommend-link:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255, 153, 0, 0.4);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    color: #666;
    font-size: 0.85rem;
}

.footer-links {
    margin: 15px 0;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    color: #00d4ff;
}

.copyright {
    color: #555;
    margin-top: 10px;
}

/* Checkbox styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Legal pages (Terms, Privacy) */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.legal-page h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #fff;
    text-align: center;
}

.legal-page .last-updated {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.legal-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.legal-section h3 {
    color: #00d4ff;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.legal-section h4 {
    color: #ccc;
    font-size: 1rem;
    margin: 15px 0 10px;
}

.legal-section p {
    color: #aaa;
    line-height: 1.8;
    margin-bottom: 10px;
}

.legal-section ul {
    color: #aaa;
    line-height: 1.8;
    margin-left: 20px;
    margin-bottom: 10px;
}

.legal-section li {
    margin-bottom: 5px;
}

.legal-section a {
    color: #00d4ff;
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

/* 関連記事セクション */
.related-articles {
    margin: 50px 0;
}

.related-articles h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    color: #fff;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.article-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
}

.article-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #00d4ff;
    transform: translateY(-3px);
}

.article-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.article-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #00d4ff;
}

.article-info p {
    color: #999;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 768px) {
    .article-card {
        flex-direction: column;
        text-align: center;
    }
}
