/**
 * 苹果玻璃风格UI样式系统
 * 统一的玻璃效果样式，适用于多个页面
 */

/* 基础玻璃效果样式 */
body.glass-theme {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 50%, #f3e5f5 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    /* 禁用文本选择和拖拽 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* 禁用双击缩放 */
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Bootstrap 4 兼容性 */
.text-dark {
    color: #343a40 !important;
}

.font-weight-medium {
    font-weight: 500 !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.bg-primary-light {
    background-color: rgba(0, 123, 255, 0.25) !important;
}

.bg-success-light {
    background-color: rgba(40, 167, 69, 0.25) !important;
}

.bg-info-light {
    background-color: rgba(23, 162, 184, 0.25) !important;
}

/* 玻璃卡片效果 */
.glass-card {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 24px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 玻璃按钮样式 */
.glass-button {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 16px !important;
    color: #333;
    font-weight: 600;
    padding: 12px 24px;
    position: relative;
    overflow: hidden;
}

.glass-button.btn-primary {
    background: rgba(0, 123, 255, 0.3) !important;
    color: #0056b3;
}


.glass-button.btn-success {
    background: rgba(40, 167, 69, 0.3) !important;
    color: #155724;
}


.glass-button.btn-danger {
    background: rgba(220, 53, 69, 0.3) !important;
    color: #721c24;
}


/* 玻璃输入框样式 */
.glass-input {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 16px !important;
    color: #333;
    padding: 12px 16px;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(0, 123, 255, 0.5) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.glass-input::placeholder {
    color: rgba(108, 117, 125, 0.8);
}

/* 玻璃选择框样式 */
.glass-select {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 16px !important;
    color: #333;
    padding: 12px 16px;
}

.glass-select:focus {
    background: rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(0, 123, 255, 0.5) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* 玻璃模态框样式 */
.glass-modal .modal-content {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 24px !important;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.2);
}

.glass-modal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 24px 24px 16px;
}

.glass-modal .modal-body {
    padding: 16px 24px;
}

.glass-modal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 16px 24px 24px;
}

/* 玻璃表格样式 */
.glass-table {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-table table {
    background: transparent;
    margin-bottom: 0;
}

.glass-table thead th {
    background: rgba(255, 255, 255, 0.4);
    border: none;
    font-weight: 600;
    color: #333;
    padding: 16px;
}

.glass-table tbody td {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 16px;
    color: #333;
}

.glass-table tbody tr:last-child td {
    border-bottom: none;
}

/* 玻璃徽章样式 */
.glass-badge {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: #333;
    font-weight: 600;
    padding: 6px 12px;
}

.glass-badge.badge-primary {
    background: rgba(0, 123, 255, 0.3) !important;
    color: #0056b3;
}

.glass-badge.badge-success {
    background: rgba(40, 167, 69, 0.3) !important;
    color: #155724;
}

.glass-badge.badge-warning {
    background: rgba(255, 193, 7, 0.3) !important;
    color: #856404;
}

.glass-badge.badge-danger {
    background: rgba(220, 53, 69, 0.3) !important;
    color: #721c24;
}

.glass-notification {
    color: #1f2937;
    padding: 14px 16px;
    border-radius: 18px !important;
}

.glass-notification.notification-success {
    background: #dcfce7 !important;
    border-color: #86efac !important;
    color: #166534;
}

.glass-notification.notification-error {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #b91c1c;
}

.glass-notification.notification-warning {
    background: #fef3c7 !important;
    border-color: #fcd34d !important;
    color: #92400e;
}

.glass-notification.notification-info {
    background: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1d4ed8;
}

.glass-notification-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    opacity: 0.7;
}

.glass-notification-close:hover {
    opacity: 1;
}

/* 玻璃进度条样式 */
.glass-progress {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    height: 20px;
    overflow: hidden;
}

.glass-progress .progress-bar {
    background: linear-gradient(90deg, rgba(0, 123, 255, 0.6), rgba(0, 123, 255, 0.8));
    border-radius: 12px;
}

/* 玻璃分页样式 */
.glass-pagination .page-link {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
    border-radius: 12px;
    margin: 0 2px;
}

.glass-pagination .page-item.active .page-link {
    background: rgba(0, 123, 255, 0.4);
    border-color: rgba(0, 123, 255, 0.5);
    color: #0056b3;
}

/* 波纹效果 */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
}


/* 特殊效果类 */
.glass-shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.glass-shadow-md {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-shadow-lg {
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.15);
}

.glass-blur-sm {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.glass-blur-md {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.glass-blur-lg {
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}
