/* 好好玩课堂 - 现代化主题样式 */

/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa !important;
}

/* ==================== 顶部导航栏优化 ==================== */
.layui-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3);
    z-index: 1000;
}

.layui-logo {
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.layui-logo::before {
    content: '';
    font-size: 20px;
    margin-right: 5px;
}

.layui-header .layui-nav {
    background: transparent !important;
}

.layui-header .layui-nav .layui-nav-item > a {
    color: rgba(255, 255, 255, 0.95) !important;
    transition: all 0.3s ease;
}

.layui-header .layui-nav .layui-nav-item > a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

.layui-header .layui-nav .layui-this {
    background: rgba(255, 255, 255, 0.2) !important;
}

.layui-header .layui-nav .layui-this > a {
    color: #fff !important;
}

/* ==================== 左侧菜单栏优化 ==================== */
.layui-side {
    background: #fff !important;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
    border-right: 1px solid #f0f0f0;
}

.layui-side .layui-nav {
    background: #fff !important;
}

.layui-side .layui-nav-tree .layui-nav-item {
    line-height: 45px !important;
}

.layui-side .layui-nav-tree .layui-nav-item > a {
    color: #595959 !important;
    padding: 0 20px !important;
    height: 45px !important;
    line-height: 45px !important;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.layui-side .layui-nav-tree .layui-nav-item > a:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, transparent 100%) !important;
    border-left-color: #667eea;
    color: #667eea !important;
}

.layui-side .layui-nav-tree .layui-this,
.layui-side .layui-nav-tree .layui-nav-itemed {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, transparent 100%) !important;
}

.layui-side .layui-nav-tree .layui-nav-itemed > a {
    background: transparent !important;
    color: #262626 !important;
}

.layui-side .layui-nav-tree .layui-this > a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-left: 3px solid #667eea !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    margin: 2px 0;
    border-radius: 0 8px 8px 0;
}

.layui-side .layui-nav-child {
    background: #fafafa !important;
}

.layui-side .layui-nav-child dd {
    line-height: 40px !important;
}

.layui-side .layui-nav-child dd > a {
    color: #8c8c8c !important;
    padding-left: 45px !important;
    height: 40px !important;
    line-height: 40px !important;
    transition: all 0.3s ease;
}

.layui-side .layui-nav-child dd > a:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, transparent 100%) !important;
    color: #667eea !important;
    padding-left: 50px !important;
}

.layui-side .layui-nav-child dd.layui-this > a {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15) 0%, transparent 100%) !important;
    color: #667eea !important;
    font-weight: 500;
}

/* ==================== 标签页优化 ==================== */
.layui-tab {
    margin: 0 !important;
}

.layui-tab-title {
    background: #f5f7fa !important;
    border-bottom: none !important;
    padding: 8px 10px 0 10px !important;
    height: 50px !important;
}

.layui-tab-title li {
    color: #595959 !important;
    padding: 0 20px !important;
    line-height: 38px !important;
    height: 38px !important;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    margin: 0 4px;
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    border-bottom: none !important;
    position: relative;
    top: 1px;
}

.layui-tab-title li:hover {
    color: #667eea !important;
    background: #fff !important;
    box-shadow: 0 -2px 8px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.layui-tab-title li.layui-this {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 -4px 12px rgba(102, 126, 234, 0.3) !important;
    transform: translateY(-2px);
}

.layui-tab-title li.first-tab.layui-this {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
}

.layui-tab-title .layui-this .layui-tab-close {
    color: rgba(255, 255, 255, 0.85) !important;
    transition: all 0.3s ease;
}

.layui-tab-title .layui-this .layui-tab-close:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-radius: 50%;
}

/* 确保关闭按钮在非激活标签上也能正常显示 */
.layui-tab-title li .layui-tab-close {
    color: #999 !important;
}

.layui-tab-title li:hover .layui-tab-close {
    color: #666 !important;
}

/* 标签内容区域 */
.layui-tab-content {
    background: #fff !important;
    border-top: 1px solid #e8e8e8;
}

/* 内容包装器 - 无标签栏模式 */
.content-wrapper {
    width: 100%;
    height: 100%;
    background: #fff;
}

.content-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==================== 固定通知框优化（主页面右上角「课程通知」） ==================== */
.fixed-notification {
    position: fixed;
    top: 70px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    display: block;
    opacity: 1;
    visibility: visible;
    z-index: 2147483647;
    max-width: 320px;
    min-width: 280px;
    animation: slideInRight 0.5s ease-out;
    pointer-events: auto;
    transform: translateZ(0);
    isolation: isolate;
}

.notification-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    padding-right: 70px; /* 为缩小按钮留出空间 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.notification-body {
    padding: 15px 16px;
    font-size: 13px;
    line-height: 1.8;
    max-height: 300px;
    overflow-y: auto;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 课程通知头部操作按钮容器 */
.notification-actions {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
}

.notification-btn-mini {
    padding: 2px 8px;
    font-size: 12px;
    line-height: 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", sans-serif;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.notification-btn-mini:hover {
    background: rgba(255, 255, 255, 0.4);
    color: #fff;
}

a.notification-btn-mini {
    text-decoration: none;
    color: #fff;
}

/* 通知按钮样式（缩小后显示的浮动按钮） */
.notification-btn {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2147483647;
    pointer-events: auto;
    transform: translateZ(0);
    isolation: isolate;
    transition: all 0.3s ease;
}

.notification-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.notification-btn i {
    font-size: 24px;
    color: white;
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    background: #ff4d4f;
    border-radius: 50%;
    font-size: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* ==================== 按钮样式优化 ==================== */
.layui-btn {
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
    font-weight: 400 !important;
}

.layui-btn-normal {
    background: #1890ff !important;
    border: none !important;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045) !important;
}

.layui-btn-normal:hover {
    background: #40a9ff !important;
    box-shadow: 0 2px 4px rgba(24, 144, 255, 0.3) !important;
}

.layui-btn-primary {
    border-color: #d9d9d9 !important;
    color: #595959 !important;
}

.layui-btn-primary:hover {
    border-color: #40a9ff !important;
    color: #40a9ff !important;
}

/* ==================== 表单元素优化 ==================== */
.layui-input,
.layui-textarea,
.layui-select {
    border-radius: 4px !important;
    border-color: #d9d9d9 !important;
    transition: all 0.3s ease !important;
}

.layui-input:focus,
.layui-textarea:focus {
    border-color: #40a9ff !important;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1) !important;
}

/* ==================== 表格样式优化 ==================== */
.layui-table {
    border-radius: 4px !important;
    overflow: hidden !important;
}

.layui-table thead tr {
    background: #fafafa !important;
}

.layui-table thead tr th {
    color: #262626 !important;
    font-weight: 600 !important;
    border-bottom: 2px solid #e8e8e8 !important;
}

.layui-table tbody tr:hover {
    background: #f5f5f5 !important;
}

/* ==================== 卡片样式 ==================== */
.layui-card {
    border-radius: 8px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e8e8e8 !important;
    transition: all 0.3s ease !important;
}

.layui-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.layui-card-header {
    background: #fafafa !important;
    border-bottom: 1px solid #e8e8e8 !important;
    font-weight: 600 !important;
    color: #262626 !important;
}

/* ==================== 弹层优化 ==================== */
.layui-layer {
    border-radius: 8px !important;
    overflow: hidden !important;
}

.layui-layer-title {
    background: #fafafa !important;
    color: #262626 !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #e8e8e8 !important;
}

.layui-layer-btn {
    padding: 15px !important;
    background: #fafafa !important;
    border-top: 1px solid #e8e8e8 !important;
}

.layui-layer-btn .layui-layer-btn0 {
    background: #1890ff !important;
    border: none !important;
    border-radius: 4px !important;
    color: #fff !important;
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #bfbfbf;
    border-radius: 4px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ==================== 响应式优化 ==================== */
@media screen and (max-width: 768px) {
    .fixed-notification {
        right: 10px;
        max-width: 250px;
        font-size: 12px;
        padding: 12px 15px;
    }
    
    .layui-logo {
        font-size: 16px !important;
    }
}

/* ==================== 加载动画 ==================== */
.layui-layer-loading .layui-layer-content {
    background: #1890ff !important;
}

/* ==================== 面包屑导航 ==================== */
.layui-breadcrumb {
    visibility: visible !important;
}

.layui-breadcrumb a {
    color: #1890ff !important;
    transition: all 0.3s ease;
}

.layui-breadcrumb a:hover {
    color: #40a9ff !important;
}
