:root {
    /* ヘキサゴンのサイズをCSS変数で一元管理 */
    --hex-width: 200px;
    /* 正確な高さを計算 (幅 * sqrt(3) / 2) */
    --hex-height: calc(var(--hex-width) * 0.866025);
}

body,
html {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* background-color is handled by common.css to support theming */
    font-family: 'Arial', sans-serif;
}

/* ヘキサゴン背景 */
#hexagon-container {
    position: fixed;
    top: calc(var(--hex-height) / -4);
    left: calc(var(--hex-width) / -4);
    width: calc(100% + var(--hex-width));
    height: calc(100% + var(--hex-height));
    z-index: 1;
}

.hexagon {
    position: absolute;
    width: var(--hex-width);
    height: var(--hex-height);
    background-color: var(--grid-color);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
    will-change: background-color, transform;
}

.hexagon:hover {
    background-color: var(--header-accent-color);
}

/* General Layout Improvements */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

/* Options Panel Adjustments */
.option-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
}

#length-input {
    width: 60px;
}

#length-slider {
    width: 100%;
}

.checkbox-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 1.5rem 0;
}

.checkbox-options .option {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Generate Button */
#generate-button {
    padding: 4px 12px;
    font-size: 1rem;
}

/* Password Display */
#password-display-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

#password-output {
    flex-grow: 1;
    overflow-wrap: break-word;
    word-break: break-all;
    padding: 10px;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 5px;
    background-color: var(--input-bg, #f9f9f9);
}

#copy-button {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* History Section Layout */
#history-list-container {
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color, #eee);
}

.history-info {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-password {
    font-family: monospace;
    margin-right: 10px;
}

.history-actions {
    display: flex;
    flex-shrink: 0;
    gap: 10px;
}

/* Standardize button sizes in history */
.history-actions button {
    padding: 5px 10px;
    font-size: 0.9rem;
}