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

body {
    font-family:
        /* 日本語フォント優先 */
        "Yu Gothic", "游ゴシック",
        "Meiryo", "メイリオ",
        "Hiragino Sans", "ヒラギノ角ゴシック",
        "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN",
        "Noto Sans JP",
        "Source Han Sans JP", "源ノ角ゴシック JP",
        /* 中国語フォント */
        "Microsoft YaHei", "微软雅黑",
        "PingFang SC",
        /* 西洋フォント */
        'Segoe UI', Tahoma, Geneva, Verdana,
        /* 汎用フォールバック */
        sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.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 20px;
    text-align: center;
}

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

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

main {
    padding: 40px 20px;
}

.upload-section {
    margin-bottom: 30px;
}

.upload-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
}

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

.tab-btn:hover {
    background: #7c8ff5;
    color: white;
}

.tab-content {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    min-height: 200px;
}

.tab-content.hidden {
    display: none;
}

.file-upload {
    text-align: center;
}

.upload-label {
    display: block;
    padding: 60px 20px;
    border: 3px dashed #667eea;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-label:hover {
    border-color: #764ba2;
    background: #f0f0ff;
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 0.9em;
    color: #666;
}

.file-name {
    margin-top: 15px;
    font-size: 1em;
    color: #667eea;
    font-weight: bold;
}

.url-input {
    padding: 20px;
}

.input-field {
    width: 100%;
    padding: 15px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s;
}

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

.input-hint {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.analyze-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

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

.analyze-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-loader.hidden,
.btn-text.hidden {
    display: none;
}

.progress-section {
    margin: 30px 0;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 12px;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    animation: progress 2s infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

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

.results-section {
    margin-top: 30px;
}

.results-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.summary-card {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 5px solid #667eea;
}

.summary-card h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.download-section {
    margin: 30px 0;
    text-align: center;
}

.download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

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

.download-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.download-icon {
    font-size: 1.3em;
}

.download-loader.hidden,
.download-text.hidden {
    display: none;
}

.result-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.result-card h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.error-section {
    margin: 30px 0;
}

.error-card {
    background: #ffe0e0;
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid #ff4444;
}

.error-card h3 {
    color: #cc0000;
    margin-bottom: 15px;
}

.error-card p {
    color: #660000;
}

.hidden {
    display: none !important;
}

footer {
    background: #f5f5f5;
    padding: 20px;
    text-align: center;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 0.9em;
    }

    main {
        padding: 20px 10px;
    }

    .tabs {
        flex-direction: column;
    }
}

/* 音声要約システム専用スタイル */
.audio-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.audio-overview {
    font-size: 1.05em;
    line-height: 1.7;
    color: #555;
}

.key-points-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.key-points-list li {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-size: 1em;
    line-height: 1.5;
    color: #444;
}

.key-points-list li:last-child {
    margin-bottom: 0;
}

.result-card p {
    font-size: 1.05em;
    line-height: 1.7;
    color: #555;
}
