* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #ddd;
}

header {
    background: #2c3e50;
    color: #fff;
    padding: 25px 30px;
    border-bottom: 3px solid #1a252f;
}

h1 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.info-box {
    background: #34495e;
    padding: 12px 18px;
    display: inline-block;
    border-left: 3px solid #e67e22;
}

.info-box p {
    margin: 3px 0;
    font-size: 0.95rem;
    color: #ecf0f1;
}

.info-box strong {
    color: #fff;
    font-weight: 600;
}

main {
    padding: 30px;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Home Link */
.home-link {
    display: inline-block;
    color: #ecf0f1;
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 15px;
    opacity: 0.8;
    transition: opacity 0.2s;
    font-weight: 500;
}

.home-link:hover {
    opacity: 1;
    color: #fff;
}

/* Upload Section */
.upload-section {
    text-align: center;
}

.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    background: #fafafa;
    transition: all 0.3s;
    cursor: pointer;
}

.drop-zone:hover {
    border-color: #e67e22;
    background: #fef8f0;
}

.drop-zone.dragover {
    border-color: #e67e22;
    background: #fdf0e0;
    border-style: solid;
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.drop-zone-content svg {
    color: #999;
}

.drop-text {
    color: #666;
    font-size: 1rem;
}

.file-label {
    display: inline-block;
    padding: 10px 24px;
    background: #e67e22;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 4px;
}

.file-label:hover {
    background: #d35400;
}

.file-hint {
    color: #999;
    font-size: 0.85rem;
}

/* Queue Section */
.queue-section {
    padding: 0 30px 20px;
}

.queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Queue Item */
.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.2s;
}

.queue-item--converting {
    border-color: #3498db;
    background: #eef7ff;
}

.queue-item--done {
    border-color: #27ae60;
    background: #f0fcf5;
}

.queue-item--error {
    border-color: #e74c3c;
    background: #fef5f5;
}

.queue-item__icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.queue-item__info {
    flex: 1;
    min-width: 0;
}

.queue-item__name {
    display: block;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item__meta {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
}

.queue-item__status {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
}

.queue-item__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Queue Action Buttons */
.btn-download-single {
    padding: 4px 8px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-download-single:hover {
    background: #219a52;
}

.btn-remove {
    padding: 4px 8px;
    background: none;
    color: #999;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-remove:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}

/* Queue Actions Bar */
.queue-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.convert-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: #e67e22;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.convert-btn:hover:not(:disabled) {
    background: #d35400;
}

.convert-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.download-zip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.download-zip-btn:hover:not(:disabled) {
    background: #2980b9;
}

.download-zip-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* Notice Section */
.notice-section {
    background: #fffbe6;
    border: 1px solid #e6d8a8;
    border-left: 4px solid #d4a017;
    padding: 20px;
    margin: 0 30px 25px 30px;
}

.notice-section h2 {
    color: #5d4e00;
    margin-bottom: 12px;
    font-size: 1.1rem;
    border-bottom: none;
    padding-bottom: 0;
}

.notice-content p {
    color: #665500;
    margin: 8px 0;
    line-height: 1.6;
    font-size: 0.9rem;
}

.notice-content strong {
    color: #4a4000;
}

/* Footer */
footer {
    background: #f8f9fa;
    text-align: center;
    padding: 15px 20px;
    color: #777;
    font-size: 0.85rem;
    border-top: 1px solid #ddd;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2c3e50;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.3rem;
    }

    header {
        padding: 20px;
    }

    main {
        padding: 20px;
    }

    .queue-section {
        padding: 0 20px 20px;
    }

    .notice-section {
        margin: 0 20px 20px 20px;
    }

    .drop-zone {
        padding: 30px 15px;
    }
}

@media (max-width: 480px) {
    .convert-btn, .download-zip-btn {
        font-size: 1rem;
        padding: 12px 20px;
        width: 100%;
    }

    .queue-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .queue-item {
        flex-wrap: wrap;
    }

    .queue-item__info {
        width: calc(100% - 80px);
    }

    .queue-item__actions {
        margin-left: auto;
    }
}
