/**
 * 求片登记系统样式文件
 *
 * @author Luna
 * @version 1.0
 */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-bg: #1a1a2e;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-dark: #2c3e50;
}

body {
    background: var(--primary-gradient);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.1)" points="0,0 1000,300 1000,1000 0,700"/><polygon fill="rgba(255,255,255,0.05)" points="0,300 1000,0 1000,400 0,600"/></svg>');
    z-index: -1;
}

.main-container {
    padding: 2rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.form-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: var(--secondary-gradient);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
}

.card-header h1 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-header .subtitle {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    font-size: 1rem;
}

.card-body {
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.8rem;
    position: relative;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.required {
    color: #e74c3c;
}

.form-control {
    border: 2px solid #e8ecef;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.btn-submit {
    background: var(--success-gradient);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-submit:hover::before {
    left: 100%;
}

.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.floating-circle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-circle:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.floating-circle:nth-child(3) {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 请求类型选择器样式 */
.request-type-selector {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.request-type-selector .form-check {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #e8ecef;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    flex: 1;
    /* 修复form-check布局 */
    display: flex;
    align-items: center;
    min-height: 1.5rem;
    padding-left: 1.5rem !important;
    margin-bottom: 0;
}

.request-type-selector .form-check:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.request-type-selector .form-check-input {
    /* 重置Bootstrap的浮动定位 */
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0.5rem;
    margin-top: 0;
    flex-shrink: 0;
}

.request-type-selector .form-check-input:checked + .form-check-label {
    color: #667eea;
    font-weight: 600;
}

.request-type-selector .form-check-input:checked ~ * {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.request-type-selector .form-check-label {
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

/* 错误原因选择器样式 */
.error-reason-selector .form-check {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e8ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    /* 修复form-check布局 */
    display: flex;
    align-items: center;
    min-height: 1.5rem;
    padding-left: 1rem !important;
}

.error-reason-selector .form-check:hover {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.error-reason-selector .form-check-input {
    /* 重置Bootstrap的浮动定位 */
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0.5rem;
    margin-top: 0;
    flex-shrink: 0;
}

.error-reason-selector .form-check-input:checked + .form-check-label {
    color: #ffc107;
    font-weight: 600;
}

.error-reason-selector .form-check-label {
    cursor: pointer;
    margin-bottom: 0;
    flex: 1;
}

/* 修复片源专用字段动画 */
.fix-source-fields {
    transition: all 0.4s ease;
    overflow: hidden;
}

.fix-source-fields.show {
    display: block !important;
    animation: slideDown 0.4s ease;
}

.fix-source-fields.hide {
    animation: slideUp 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
}

/* 条件显示字段样式 */
.ad-time-field, .other-reason-field {
    transition: all 0.3s ease;
    overflow: hidden;
}

.ad-time-field.show, .other-reason-field.show {
    display: block !important;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 表单验证增强 */
.form-check-input:invalid + .form-check-label {
    color: #dc3545;
}

/* 提交按钮文本切换 */
.btn-text-content {
    transition: all 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }

    .card-header {
        padding: 1.5rem;
    }

    .card-header h1 {
        font-size: 1.8rem;
    }

    .card-body {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .request-type-selector {
        flex-direction: column;
        gap: 1rem;
    }

    .request-type-selector .form-check {
        text-align: center;
    }
}

/* 加载状态 */
.loading {
    display: none;
}

.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-submit.loading .loading {
    display: inline-block;
}

.btn-submit.loading .btn-text {
    display: none;
}

/* 表单验证样式 */
.form-control.is-invalid {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* 速率限制样��� */
.btn-submit.rate-limited {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    cursor: not-allowed;
    opacity: 0.8;
}

.btn-submit.rate-limited:hover {
    transform: none;
    box-shadow: none;
}

.btn-submit.rate-limited::before {
    display: none;
}

/* Toast 提示样式 */
.toast-container {
    z-index: 1050;
}

.toast {
    min-width: 250px;
}

/* 页脚样式 */
footer {
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    z-index: 1000;
}
