/* ヘッダー */
header {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    position: relative; /* この行を追加 */
    margin-bottom: 10px;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}
/* ホームボタンのスタイル */
.home-button {
    position: absolute; /* headerを基準に絶対配置 */
    top: 20px;
    right: 20px;
    
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.2s ease-in-out;
}

/* ボタンにマウスを乗せた時のスタイル */
.home-button:hover {
    background-color: #2980b9;
}

@media (max-width: 900px) {
    /* ホームボタン自体のスタイル */
    .home-button {
        padding: 10px;      /* アイコンが中央に来るように調整 */
        font-size: 1.2rem;  /* アイコンのサイズを調整 */
        right: 15px;
    }
    header h1 {
    margin: 0;
    font-size: 1.5rem;
}
    
    /* ボタン内のテキストを非表示に */
    .home-button .button-text {
        display: none;
    }
}


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hiragino Sans', 'Noto Sans CJK JP', 'Yu Gothic', Meiryo, sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

#userInput {
    width: 100%;
    height: 150px;
    font-size: 16px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.tab-buttons button {
    padding: 10px 20px;
    cursor: pointer;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.tab-buttons button.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab {
    display: none; /* 初期状態では非表示 */
    padding: 10px;
    background-color: #fdfdfd;
    border-radius: 5px;
    text-align: center;
}
.tab.active {
    display: block; /* アクティブなタブだけ表示 */
}

.symbol-btn {
    width: 50px;
    height: 50px;
    margin: 5px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.symbol-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.symbol-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


#previewArea {
    min-height: 80px;
    padding: 20px;
    margin-top: 15px;
    background-color: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
}

#displayTeX {
    font-size: 1.5em; /* 数式を大きく表示 */
}

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 30px 0;
}

.save-section, .action-buttons {
    text-align: center;
}

#fileName {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-top: 5px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.save-btn { background-color: #28a745; }
.save-btn:hover { background-color: #218838; }

.copy-btn { background-color: #007bff; }
.copy-btn:hover { background-color: #0069d9; }

.clear-btn { background-color: #dc3545; }
.clear-btn:hover { background-color: #c82333; }

.note {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
    color: #6c757d;
}