/* Custom Properties / Variables */
:root {
    /* Light Theme */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --success-color: #10b981;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* Dark Theme Overrides */
body.dark-mode {
    --primary-color: #3b82f6;
    --primary-hover: #60a5fa;
    --bg-color: #0f172a;
    --bg-light: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --card-bg: #1e293b;
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.w-100 { width: 100%; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.shadow-lg { box-shadow: var(--shadow-lg); }
.hidden { display: none !important; }
.bg-light { background-color: var(--bg-light); }
.section-padding { padding: 80px 0; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    font-size: 1rem;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--bg-light);
}

.btn-text {
    background-color: transparent;
    color: var(--text-muted);
}

.btn-text:hover {
    color: var(--text-main);
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: var(--bg-light);
}

/* Header */
.header {
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    background-color: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Hero */
.hero {
    padding: 60px 0 40px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
}

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.badge i.fa-check-circle { color: var(--success-color); }
.badge i.fa-shield-halved { color: var(--primary-color); }

/* Tool Container */
.tool-section {
    margin-bottom: 60px;
}

.tool-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 40px;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.step-container {
    display: none;
    animation: fadeIn 0.4s ease;
}

.step-container.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dropzone */
.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--bg-light);
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

.dropzone-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.dropzone h3 {
    margin-bottom: 5px;
}

.dropzone p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Processing Step */
.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background-color: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.file-info i {
    font-size: 1.5rem;
    color: #ef4444;
}

.file-info span:first-of-type {
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-gray {
    background-color: var(--border-color);
    color: var(--text-main);
}

.compression-options h4 {
    margin-bottom: 15px;
}

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

.option-card {
    cursor: pointer;
    position: relative;
}

.option-card input {
    position: absolute;
    opacity: 0;
}

.option-content {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.option-card:hover .option-content {
    border-color: var(--primary-color);
}

.option-card.selected .option-content {
    border-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

.option-title {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
}

.option-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Progress */
.progress-container {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.2s ease;
}

.security-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--success-color);
    margin-top: 15px;
}

/* Result Step */
.success-header {
    text-align: center;
    margin-bottom: 30px;
}

.success-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 15px;
}

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

.stat-box {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.highlight { color: var(--primary-color); }
.highlight-green { color: var(--success-color); }

.preview-container h4 {
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

#pdfPreview {
    width: 100%;
    height: 300px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #f1f5f9;
}

/* Features */
.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* FAQ */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: var(--card-bg);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 20px;
    background: transparent;
    border: none;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 200px;
}

.faq-answer p {
    color: var(--text-muted);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    background-color: var(--bg-color);
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .options-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; gap: 10px; }
    .tool-card { padding: 20px; border-radius: 0; border-left: none; border-right: none;}
    .mobile-only { display: block; }
}
@media (min-width: 769px) {
    .mobile-only { display: none; }
  }
