/* 调研页面专用样式增强 */

/* 进度条样式 */
.progress-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 800px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d2ff, #7a3fff);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #c0c0ff;
}

/* 问题编号样式 */
.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, #00d2ff, #7a3fff);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    margin-right: 10px;
    font-size: 0.9rem;
}

/* 表单组动画 */
.form-group {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.6s ease forwards;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 单选框和复选框样式 */
.radio-item, .checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.radio-item:hover, .checkbox-item:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: rgba(0, 210, 255, 0.3);
    transform: translateX(5px);
}

.radio-item input, .checkbox-item input {
    margin-right: 12px;
    transform: scale(1.2);
    cursor: pointer;
}

.radio-item label, .checkbox-item label {
    cursor: pointer;
    flex: 1;
    margin: 0;
}

/* 选中状态样式 */
.radio-item:has(input:checked), .checkbox-item:has(input:checked) {
    background: rgba(0, 210, 255, 0.15);
    border-color: rgba(0, 210, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
}

/* 选项悬停效果增强 */
.radio-item::before, .checkbox-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.1), transparent);
    transition: left 0.5s;
}

.radio-item:hover::before, .checkbox-item:hover::before {
    left: 100%;
}

/* 自定义单选框样式 */
.custom-radio {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.custom-radio input {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.custom-radio .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.custom-radio input:checked ~ .checkmark {
    background: linear-gradient(45deg, #00d2ff, #7a3fff);
    border-color: #00d2ff;
}

.custom-radio .checkmark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
}

.custom-radio input:checked ~ .checkmark::after {
    transform: translate(-50%, -50%) scale(1);
}

/* 自定义复选框样式 */
.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.custom-checkbox input {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.custom-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.custom-checkbox input:checked ~ .checkmark {
    background: linear-gradient(45deg, #00d2ff, #7a3fff);
    border-color: #00d2ff;
}

.custom-checkbox .checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

.custom-checkbox input:checked ~ .checkmark::after {
    transform: rotate(45deg) scale(1);
}

/* 星级评分样式 */
.star-rating {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin: 20px 0;
}

.star {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.star:hover,
.star.active {
    color: #ffd700;
    transform: scale(1.1);
}

.star:hover ~ .star {
    color: rgba(255, 255, 255, 0.3);
    transform: scale(1);
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9rem;
}

.tooltip .tooltiptext::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 表单验证样式 */
.form-control.valid {
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.form-control.invalid {
    border-color: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

/* 只读输入框样式 */
.form-control[readonly] {
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid rgba(0, 210, 255, 0.3);
    color: #00d2ff;
    cursor: not-allowed;
    position: relative;
}

.form-control[readonly]:focus {
    outline: none;
    border-color: rgba(0, 210, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.form-control[readonly]::placeholder {
    color: rgba(0, 210, 255, 0.6);
    font-style: italic;
}

/* 自动填写提示样式 */
.auto-fill-hint {
    display: block;
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 6px;
    color: #28a745;
    font-size: 12px;
    font-weight: 500;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 12, 41, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #00d2ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功动画增强 */
.success-animation {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 优惠券代码复制功能 */
.coupon-container {
    position: relative;
    display: inline-block;
}

.copy-btn {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #00d2ff;
}

.copy-success {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-success.show {
    opacity: 1;
}

/* 响应式增强 */
@media (max-width: 480px) {
    .progress-container {
        padding: 10px;
    }
    
    .question-number {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }
    
    .star {
        font-size: 1.5rem;
    }
    
    .copy-btn {
        position: static;
        margin-top: 10px;
        display: block;
        width: 100%;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .form-control {
        background: rgba(255, 255, 255, 0.03);
    }
    
    .glass {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* 打印样式 */
@media print {
    .particles, .tech-bg, .floating-elements {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .glass {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 2px;
    }
    
    .glass {
        border-width: 2px;
    }
    
    .neon-text, .submit-btn {
        filter: contrast(1.5);
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-element {
        animation: none;
    }
    
    .particles {
        display: none;
    }
}

/* 弹窗样式 */
.modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.modal-content h3 {
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
}

.modal-content textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 20px;
}

.modal-content textarea:focus {
    outline: none;
    border-color: #00d2ff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.modal-content textarea::placeholder {
    color: #b0b0ff;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ff6b6b;
}

.modal-btn {
    background: linear-gradient(45deg, #00d2ff, #7a3fff);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 登录提示样式 */
.login-prompt {
    margin-top: 10px;
    padding: 15px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    animation: fadeIn 0.3s ease;
}

.login-prompt p {
    margin: 0;
    color: #ffc107;
    font-size: 0.9rem;
}

.login-link {
    color: #00d2ff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-link:hover {
    color: #7a3fff;
    text-decoration: underline;
}

/* 响应式弹窗 */
@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .modal-content h3 {
        font-size: 1.1rem;
    }
    
    .close {
        font-size: 24px;
        top: 10px;
        right: 15px;
    }
}