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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin: 2rem 0;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #e6f3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 1.3rem;
    opacity: 0.95;
    font-weight: 400;
}

.tab-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    margin: 0 0 2rem 0;
    position: sticky;
    top: 20px;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tab-nav .container {
    display: flex;
    justify-content: center;
    padding: 0.5rem;
}

.tab-button {
    background: transparent;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0 0.25rem;
}

.tab-button:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.tab-button.active {
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

main {
    padding: 0 0 2rem 0;
    min-height: calc(100vh - 200px);
}

/* 広告スタイル */
.banner-ad {
    text-align: center;
    margin: 1rem 0 2rem 0;
}

.main-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}


.content-area {
    flex: 1;
    min-width: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
    
    
    .content-area {
        order: 1;
    }
    
    .banner-ad {
        margin: 0.5rem 0 1rem 0;
    }
}

@media (max-width: 480px) {
    .banner-ad {
        display: none;
    }
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tool-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.tool-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.tool-section h2 {
    margin-bottom: 2rem;
    color: #1a202c;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-area {
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 2rem;
    background: rgba(102, 126, 234, 0.02);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-area:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
}

.upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.upload-area p {
    color: #64748b;
    font-size: 1.2rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.resize-options,
.convert-options,
.icon-options {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.input-group label {
    min-width: 140px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.input-group input,
.input-group select {
    flex: 1;
    max-width: 300px;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(209, 213, 219, 0.5);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

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

.input-group input[type="checkbox"] {
    flex: none;
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    accent-color: #667eea;
}

.process-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.process-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.process-btn:hover::before {
    left: 100%;
}

.process-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.process-btn:active {
    transform: translateY(-1px);
}

.process-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.results-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.result-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.result-item img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.result-item .file-info {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.download-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.download-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0;
    transition: width 0.3s ease;
}


/* New section styles */
.guide-section,
.faq-section,
.blog-section {
    margin-bottom: 3rem;
}

.guide-content,
.faq-content,
.blog-content {
    max-width: 100%;
}

.guide-item,
.faq-item {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    border-left: 4px solid #667eea;
}

.guide-item h3,
.faq-item h3 {
    color: #1a202c;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.guide-item p,
.faq-item p {
    color: #4a5568;
    line-height: 1.7;
    font-size: 1rem;
}

.step-list {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.step-list li {
    margin-bottom: 0.75rem;
    color: #4a5568;
    line-height: 1.6;
}

.platform-sizes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.platform-group {
    background: rgba(255, 255, 255, 0.6);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.platform-group h4 {
    color: #667eea;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.platform-group ul {
    list-style: none;
    padding: 0;
}

.platform-group li {
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-size: 0.95rem;
    padding-left: 1rem;
    position: relative;
}

.platform-group li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.tip-card {
    background: rgba(255, 255, 255, 0.7);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.15);
    transition: transform 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.tip-card h4 {
    color: #667eea;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.tip-card p {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
}

.blog-post {
    background: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.blog-post h3 {
    color: #1a202c;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.blog-post h4 {
    color: #667eea;
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.blog-meta {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.blog-post p {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.blog-post ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.blog-post li {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

footer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: rgba(255, 255, 255, 0.9);
    padding: 3rem 0 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    padding-left: 1rem;
    position: relative;
}

.footer-section li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

#quality-value {
    min-width: 30px;
    font-weight: bold;
    color: #667eea;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-section {
    animation: fadeInUp 0.6s ease-out;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    header {
        margin: 1rem 0;
        padding: 2rem 0;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    header p {
        font-size: 1.1rem;
    }
    
    .tab-nav .container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .tab-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .tool-section {
        padding: 1.5rem;
    }
    
    .upload-area {
        padding: 2.5rem 1rem;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .input-group label {
        min-width: auto;
        margin-bottom: 0;
    }
    
    .input-group input,
    .input-group select {
        max-width: none;
    }
    
    .results-area {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .process-btn {
        width: 100%;
        padding: 1.2rem;
    }
    
    .platform-sizes {
        grid-template-columns: 1fr;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .guide-item,
    .faq-item,
    .blog-post {
        padding: 1.2rem;
    }
}