/* ==========================================================================
   快乐农场 - 弹窗系统与全屏遮罩 (modals.css)
   ========================================================================== */

/* ==========================================================================
   1. 基础弹窗骨架 (Base Modal Layout)
   ========================================================================== */

/* 遮罩层 (Overlay) - 全屏覆盖，居中显示内容 */
.modal-overlay {
    display: none; /* 默认隐藏，由 JS 修改为 flex */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1100;
    backdrop-filter: blur(2px);
}

/* 弹窗内容框 */
.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.modal-content h3 {
    margin-top: 0;
    color: #333;
}

/* ==========================================================================
   2. 弹窗内通用控件 (Modal Controls & Options)
   ========================================================================== */

/* 弹窗内部选项列表 (如种子选择) */
#modal-options-container {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

/* 弹窗内的通用选项按钮 */
.modal-option-btn {
    padding: 12px;
    font-size: 1em;
    background-color: #fff;
    color: #333;
    border: 2px solid #007bff;
    width: 100%;
    text-align: left;
    padding-left: 20px;
}
.modal-option-btn:hover {
    background-color: #e7f1ff;
}

.plant-weather-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.82em;
    font-weight: 800;
}

.plant-weather-hint.good {
    color: #1f8f5f;
}

.plant-weather-hint.bad {
    color: #c24d35;
}

/* 通用取消按钮 */
.modal-cancel-btn {
    width: 100%;
    background-color: #6c757d;
    margin-top: 10px;
}
.modal-cancel-btn:hover {
    background-color: #5a6268;
}

/* ==========================================================================
   3. 交易与使用道具弹窗特化 (Transaction & Item Usage)
   ========================================================================== */

/* 数量加减控制区 */
.trans-control-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}
.trans-control-area input {
    width: 80px;
    text-align: center;
    font-size: 1.2em;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 数量增减小按钮 */
.qty-btn {
    padding: 5px 12px;
    font-size: 1.2em;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

/* 最大数量按钮 */
.max-btn {
    background-color: #ffc107;
    color: #333;
    padding: 6px 10px;
    font-size: 0.8em;
}

/* 交易总计摘要区域 */
.trans-summary {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* ==========================================================================
   4. 设置菜单弹窗 (Settings Menu)
   ========================================================================== */

.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.settings-grid button {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.settings-grid button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* ==========================================================================
   5. 专注模式全屏遮罩与控件 (Focus Mode Overlay)
   ========================================================================== */

/* 专注模式全屏遮罩 */
.focus-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #212529; /* 深色背景 */
    z-index: 5000; /* 最高层级 */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.focus-container {
    text-align: center;
    color: white;
}

/* 巨大倒计时文本 */
#focus-timer-display {
    font-size: 4em;
    font-family: monospace;
    font-weight: bold;
    color: #61dafb;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(97, 218, 251, 0.5);
}

/* 放弃专注按钮 */
.focus-stop-btn {
    background-color: transparent;
    border: 2px solid #dc3545;
    color: #dc3545;
    padding: 10px 30px;
    font-size: 1.2em;
    border-radius: 50px;
    transition: all 0.3s;
}
.focus-stop-btn:hover {
    background-color: #dc3545;
    color: white;
}

/* 专注模式 - 准备期时间设定输入框美化 */
#focus-minutes-input {
    border: 2px solid #e2e8f0;    /* 浅灰边框，比默认的立体边框更扁平高级 */
    border-radius: 20px;          /* 大圆角，与旁边的按钮保持一致 */
    background-color: #f8f9fa;    /* 浅灰背景，不刺眼 */
    width: 80px;                  /* 稍微宽一点，大气 */
    padding: 6px 10px;            /* 增加内部留白 */
    margin: 0 5px;                /* 左右留点空隙 */
    text-align: center;           /* 数字居中显示 */
    font-family: 'Nunito', sans-serif; /* 继承圆体字 */
    font-weight: bold;            /* 加粗 */
    font-size: 1.1em;
    color: #6f42c1;               /* 使用专注模式的主题紫，呼应按钮 */
    outline: none;                /* 去掉浏览器默认的蓝色丑框 */
    transition: all 0.2s ease;
}

/* 输入框悬停与聚焦状态 */
#focus-minutes-input:hover {
    border-color: #cbd5e0;
    background-color: #fff;
}
#focus-minutes-input:focus {
    border-color: #6f42c1;        /* 边框变紫 */
    background-color: #fff;       /* 背景变纯白 */
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.2); /* 添加一层淡淡的紫色光晕 */
}
