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

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

.container {
    max-width: 900px;
    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 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-home:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-home svg {
    width: 20px;
    height: 20px;
}

main {
    padding: 40px 30px;
}

/* Drop Zone */
.drop-zone {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9ff;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
    background: #eef0ff;
    border-color: #764ba2;
    transform: scale(1.02);
}

.drop-zone-content {
    pointer-events: none;
}

.upload-icon {
    width: 80px;
    height: 80px;
    color: #667eea;
    margin-bottom: 20px;
}

.drop-text {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 10px;
}

.drop-text-or {
    color: #666;
    margin: 15px 0;
}

.btn-select {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
    font-weight: 600;
}

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

.file-info {
    margin-top: 15px;
    color: #666;
    font-size: 0.9em;
}

/* File List */
.file-list {
    margin-top: 30px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 10px;
    margin-bottom: 10px;
}

.file-item-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-item-info svg {
    width: 30px;
    height: 30px;
    margin-right: 15px;
    color: #667eea;
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: #666;
    font-size: 0.9em;
    margin-left: 10px;
}

.btn-remove {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

.btn-remove:hover {
    background: #ff3838;
}

/* Settings Panel */
.settings-panel {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9ff;
    border-radius: 15px;
}

.setting-item {
    margin-bottom: 25px;
}

.setting-item label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.quality-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    cursor: pointer;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
}

.quality-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
}

.quality-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.85em;
    color: #666;
}

.resize-select {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
}

.resize-select:hover {
    border-color: #667eea;
}

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

.resize-note {
    margin-top: 8px;
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

.btn-convert {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px;
    font-size: 1.2em;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-convert svg {
    width: 24px;
    height: 24px;
}

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

.btn-convert:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Progress Section */
.progress-section {
    margin-top: 30px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

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

.progress-text {
    color: #666;
    font-size: 1.1em;
}

/* Results Section */
.results-section {
    margin-top: 30px;
}

.results-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.results-list {
    margin-bottom: 25px;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 10px;
    margin-bottom: 10px;
}

.result-item-info {
    flex: 1;
}

.result-name {
    font-weight: 600;
    color: #333;
}

.result-size {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.btn-download-single {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: none;
    display: inline-block;
}

.btn-download-single:hover {
    background: #5568d3;
}

.results-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-download {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px;
    font-size: 1.1em;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-download svg {
    width: 24px;
    height: 24px;
}

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

.btn-reset {
    background: #6c757d;
    color: white;
    border: none;
    padding: 18px 30px;
    font-size: 1.1em;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: #5a6268;
}

footer {
    text-align: center;
    padding: 25px;
    background: #f8f9ff;
    color: #666;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    header h1 {
        font-size: 2em;
    }

    .drop-zone {
        padding: 40px 15px;
    }

    .results-actions {
        flex-direction: column;
    }

    main {
        padding: 30px 20px;
    }
}
