/* 录屏工具专用样式 */
:root {
    --screen-primary: #2563eb;
    --screen-primary-hover: #1d4ed8;
    --screen-success: #10b981;
    --screen-warning: #f59e0b;
    --screen-danger: #ef4444;
    --screen-bg: #0f172a;
    --screen-card-bg: #1e293b;
    --screen-border: #334155;
    --screen-text: #f1f5f9;
    --screen-text-muted: #94a3b8;
    --screen-recording: #dc2626;
    --screen-recording-glow: rgba(220, 38, 38, 0.3);
}

/* 主容器 */
.screen-recorder-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 头部区域 */
.header-section {
    text-align: center;
    margin-bottom: 30px;
    background: var(--screen-card-bg);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--screen-border);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--screen-primary), var(--screen-success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--screen-text-muted);
    margin-bottom: 20px;
}

/* 用户状态徽章 */
.user-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 10px;
    border: 1.5px solid transparent;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    line-height: 1;
}

.user-status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease;
}

.user-status-badge:hover::before {
    left: 100%;
}

.user-status-badge.status-guest {
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(100, 116, 139, 0.3);
    color: #94a3b8;
}

.user-status-badge.status-guest:hover {
    background: rgba(100, 116, 139, 0.25);
    border-color: rgba(100, 116, 139, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.2);
}

.user-status-badge.status-free {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}

.user-status-badge.status-free:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.user-status-badge.status-premium {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
    position: relative;
}

.user-status-badge.status-premium:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.user-status-badge.status-premium::after {
    content: '✨';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.6; transform: translateY(-50%) scale(0.8); }
    50% { opacity: 1; transform: translateY(-50%) scale(1); }
}

.user-status-badge .status-text,
.user-status-badge .upgrade-hint {
    display: inline-block;
    line-height: 1.2;
    vertical-align: baseline;
    font-family: inherit;
    margin: 0;
    padding: 0;
}

.user-status-badge .status-text {
    font-size: 13px;
    font-weight: 500;
}

.user-status-badge .upgrade-hint {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
}

.test-mode {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* 录制控制面板 */
.recording-panel {
    background: var(--screen-card-bg);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--screen-border);
}

.recording-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.recording-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.recording-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.recording-btn:hover:before {
    left: 100%;
}

.start-btn {
    background: linear-gradient(135deg, var(--screen-success), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.stop-btn {
    background: linear-gradient(135deg, var(--screen-danger), #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.stop-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.pause-btn {
    background: linear-gradient(135deg, var(--screen-warning), #d97706);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.pause-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.recording-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-icon {
    font-size: 18px;
}

/* 录制状态 */
.recording-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 12px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--screen-text-muted);
    transition: all 0.3s ease;
}

.status-dot.recording {
    background: var(--screen-danger);
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.status-dot.paused {
    background: var(--screen-warning);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.recording-timer {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    color: var(--screen-text);
}

.recording-timer.active {
    color: var(--screen-danger);
}

/* 设置面板 */
.settings-panel {
    background: var(--screen-card-bg);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--screen-border);
}

.settings-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--screen-text);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    font-weight: 500;
    color: var(--screen-text);
}

.setting-item select {
    padding: 10px 15px;
    border: 1px solid var(--screen-border);
    border-radius: 8px;
    background: var(--screen-bg);
    color: var(--screen-text);
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.setting-item select:focus {
    outline: none;
    border-color: var(--screen-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.setting-hint {
    font-size: 12px;
    color: var(--screen-text-muted);
    margin-top: 5px;
    display: block;
    font-style: italic;
}

/* 预览区域 */
.preview-section {
    background: var(--screen-card-bg);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--screen-border);
}

.preview-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.preview-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    font-weight: 500;
    color: var(--screen-text-muted);
}

.info-value {
    font-weight: 600;
    color: var(--screen-text);
}

/* 录制列表 */
.recordings-section {
    background: var(--screen-card-bg);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--screen-border);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--screen-text);
}

.recordings-list {
    min-height: 200px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: var(--screen-text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.empty-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-hint {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* 录制项目 */
.recording-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.recording-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.recording-thumbnail {
    width: 80px;
    height: 45px;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.recording-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recording-info {
    flex: 1;
}

.recording-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--screen-text);
}

.recording-details {
    font-size: 12px;
    color: var(--screen-text-muted);
}

.recording-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: var(--screen-primary);
    color: white;
}

.action-btn.secondary {
    background: var(--screen-text-muted);
    color: white;
}

.action-btn.danger {
    background: var(--screen-danger);
    color: white;
}

.action-btn.info {
    background: #3b82f6;
    color: white;
}

.action-btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

/* 权限提示 */
.permission-notice {
    background: linear-gradient(135deg, var(--screen-card-bg), rgba(37, 99, 235, 0.1));
    border: 1px solid var(--screen-primary);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
}

.permission-notice h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--screen-text);
}

.permission-notice p {
    margin-bottom: 8px;
    color: var(--screen-text-muted);
}

.notice-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.notice-btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.notice-btn.primary {
    background: var(--screen-primary);
    color: white;
}

.notice-btn.secondary {
    background: var(--screen-text-muted);
    color: white;
}

.notice-btn.premium {
    background: linear-gradient(135deg, var(--screen-success), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.notice-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* 下载模态框 */
.download-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: var(--screen-card-bg);
    border-radius: 16px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--screen-border);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--screen-border);
}

.modal-header h3 {
    margin: 0;
    color: var(--screen-text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--screen-text-muted);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--screen-text);
}

.modal-body {
    padding: 25px;
}

.download-preview {
    margin-bottom: 20px;
}

.download-preview video {
    width: 100%;
    border-radius: 12px;
    background: #000;
}

.download-options {
    space-y: 20px;
}

.format-selection {
    margin-bottom: 20px;
}

.format-selection label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--screen-text);
}

.format-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.format-btn {
    padding: 10px 20px;
    border: 2px solid var(--screen-border);
    border-radius: 8px;
    background: transparent;
    color: var(--screen-text);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.format-btn:hover {
    border-color: var(--screen-primary);
    background: rgba(37, 99, 235, 0.1);
}

.format-btn.active {
    border-color: var(--screen-primary);
    background: var(--screen-primary);
    color: white;
}

.watermark-notice {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--screen-warning);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
}

.notice-icon {
    font-size: 24px;
}

.notice-text strong {
    color: var(--screen-warning);
    display: block;
    margin-bottom: 5px;
}

.notice-text p {
    margin: 0;
    color: var(--screen-text-muted);
    font-size: 14px;
}

.modal-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding: 20px 25px;
    border-top: 1px solid var(--screen-border);
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.primary {
    background: var(--screen-primary);
    color: white;
}

.modal-btn.secondary {
    background: var(--screen-text-muted);
    color: white;
}

.modal-btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .screen-recorder-container {
        padding: 15px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .recording-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .recording-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-info {
        grid-template-columns: 1fr;
    }
    
    .recording-item {
        flex-direction: column;
        text-align: center;
    }
    
    .recording-actions {
        justify-content: center;
    }
    
    .notice-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.recording-item {
    animation: fadeIn 0.5s ease-out;
}

.modal-content {
    animation: fadeIn 0.3s ease-out;
}

/* 水印相关样式 */
.watermark-overlay {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    padding: 20px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
    z-index: 1000 !important;
    font-size: 16px !important;
    font-weight: bold !important;
    text-align: center !important;
    pointer-events: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    user-select: none !important;
}

.watermark-overlay div {
    margin: 2px 0 !important;
}

/* 预览状态覆盖层 */
.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    z-index: 2;
    transition: opacity 0.3s ease;
}

.preview-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    text-align: center;
    color: white;
    max-width: 300px;
    padding: 20px;
}

.overlay-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.overlay-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
}

.overlay-text {
    font-size: 0.9em;
    color: #cccccc;
    line-height: 1.5;
}

/* 会员升级引导模态框样式 */
.upgrade-notice {
    text-align: center;
    padding: 20px 0;
}

.upgrade-notice h4 {
    font-size: 1.4em;
    margin-bottom: 20px;
    color: var(--screen-text);
    font-weight: 600;
}

.feature-list {
    margin: 25px 0;
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 0;
}

.feature-icon {
    font-size: 1.2em;
    width: 24px;
    text-align: center;
}

.feature-item span:last-child {
    color: var(--screen-text);
    font-weight: 500;
}

.upgrade-hint {
    margin-top: 20px;
    font-size: 1.1em;
    color: var(--screen-primary);
    font-weight: 600;
} 