body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5em;
    font-weight: 300;
}

p {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1em;
}

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

.drop-area {
    border: 2px dashed #3498db;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    background-color: #ecf0f1;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.drop-area:hover {
    background-color: #d5dbdb;
    border-color: #2980b9;
}

.drop-area.dragover {
    background-color: #d5dbdb;
    border-color: #2980b9;
    transform: scale(1.02);
}

.file-size-warning {
    text-align: center;
    color: #e74c3c;
    font-size: 0.9em;
    margin: 0;
}

.selected-file {
    background-color: #e8f5e8;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
}

.selected-file p {
    margin: 0 0 10px 0;
    text-align: left;
    color: #27ae60;
    font-weight: bold;
}

.compression-settings {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.compression-settings label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #2c3e50;
}

.compression-settings input[type="range"] {
    width: 100%;
    margin-bottom: 10px;
}

.quality-hint {
    font-size: 0.9em;
    color: #7f8c8d;
    margin: 0;
    text-align: left;
}

.action-buttons {
    text-align: center;
    margin-bottom: 20px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    margin: 5px;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

#clearSelection {
    background-color: #e74c3c;
}

#clearSelection:hover {
    background-color: #c0392b;
}

.progress-section {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background-color: #3498db;
    width: 0%;
    transition: width 0.3s ease;
}

#progressText {
    text-align: center;
    color: #7f8c8d;
    margin: 0;
}

.size-comparison {
    background-color: #e8f5e8;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
}

.size-info {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.size-item {
    text-align: center;
    padding: 10px;
    background-color: white;
    border-radius: 5px;
}

.size-item span:first-child {
    display: block;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.size-item span:last-child {
    font-size: 1.2em;
    color: #27ae60;
}

.preview-section {
    margin-bottom: 20px;
}

.preview-section h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 15px;
}

.preview-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.preview-controls button {
    padding: 8px 16px;
    font-size: 14px;
}

#pdfCanvas {
    display: block;
    margin: 0 auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    max-width: 100%;
    height: auto;
}

.download-section {
    text-align: center;
}

#downloadBtn {
    background-color: #27ae60;
    font-size: 18px;
    padding: 15px 30px;
}

#downloadBtn:hover {
    background-color: #229954;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #e74c3c;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .size-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .preview-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .drop-area {
        padding: 20px;
    }
}

/* ホームボタンのスタイル */
.home-header {
    background-color: #4CAF50;
    text-align: center;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1000;
    margin-bottom: 20px;
}

.home-button {
    display: inline-block;
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* PC表示時のスタイル */@media (min-width: 768px) {    .home-header {        text-align: right;        padding: 10px 20px;        background-color: transparent;        box-shadow: none;    }        .home-button {        display: inline-block;        background-color: #4CAF50;        border-radius: 5px;        box-shadow: 0 2px 4px rgba(0,0,0,0.2);        margin-right: 10px;    }        .home-button:hover {        background-color: #45a049;        box-shadow: 0 4px 8px rgba(0,0,0,0.3);        transform: translateY(-2px);    }}
