/* 全局防选择和防截屏样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    /* 移动端优化 */
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

/* 移动端防截屏 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
}

/* 防止拖拽保存 */
img, video, canvas {
    pointer-events: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

/* 水印容器 */
#watermark-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.watermark {
    position: absolute;
    color: rgba(255, 255, 255, 0.15);
    font-size: 14px;
    transform: rotate(-45deg);
    white-space: nowrap;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 警告覆盖层 */
#warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s;
}

#warning-overlay.hidden {
    display: none;
}

.warning-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s;
}

.warning-box h2 {
    color: #e74c3c;
    margin-bottom: 20px;
    font-size: 24px;
}

.warning-box p {
    margin: 15px 0;
    color: #333;
    line-height: 1.6;
}

.warning-box .user-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    color: #e74c3c;
    font-weight: bold;
}

.warning-box button {
    margin-top: 20px;
    padding: 12px 30px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.warning-box button:hover {
    background: #2980b9;
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

header h1 {
    color: #2c3e50;
    font-size: 36px;
    margin-bottom: 10px;
}

.subtitle {
    color: #e74c3c;
    font-size: 16px;
    font-weight: bold;
}

/* 内容网格 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .container {
        padding: 20px;
        border-radius: 10px;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .content-section h2 {
        font-size: 18px;
    }
    
    .warning-box {
        padding: 20px;
        margin: 10px;
    }
    
    .warning-box h2 {
        font-size: 20px;
    }
}

.content-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.content-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 22px;
}

/* 视频包装器 */
.video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

#protected-video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(45deg, 
        transparent 48%, 
        rgba(255, 255, 255, 0.03) 49%, 
        rgba(255, 255, 255, 0.03) 51%, 
        transparent 52%);
    background-size: 20px 20px;
}

/* Canvas包装器 */
.image-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

#protected-canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 文本内容 */
.text-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.text-content p {
    margin: 10px 0;
    color: #2c3e50;
    line-height: 1.8;
}

.highlight {
    background: #fff3cd;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    color: #856404;
}

.hint {
    margin-top: 15px;
    font-size: 14px;
    color: #7f8c8d;
    font-style: italic;
}

/* 页脚 */
footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
    color: #7f8c8d;
}

footer p {
    margin: 10px 0;
}

footer .timestamp {
    font-size: 14px;
    color: #95a5a6;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 页面失焦时的模糊效果 */
body.blurred .container {
    filter: blur(10px);
    transition: filter 0.3s;
}

/* 打印时隐藏内容 */
@media print {
    body {
        display: none !important;
    }
}
