/* =====================================================
   Jiaocloud ID - 全站统一样式
   ===================================================== */

/* ---------- 基础重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

a {
    color: #1a73e8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---------- 动画 ---------- */
@keyframes fadeInUp {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.animate-fade-in {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

/* ---------- 布局工具 ---------- */
.container {
    max-width: 1280px;
    margin: 32px auto;
    padding: 0 24px;
}

.page-title {
    font-size: 24px;
    margin-bottom: 28px;
    color: #202124;
}

/* ---------- 按钮 ---------- */
.btn {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn:hover {
    background-color: #1765cc;
    text-decoration: none;
}

.btn:disabled {
    background-color: #dadce0;
    color: #80868b;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #f1f3f4;
    color: #202124;
}

.btn-secondary:hover {
    background-color: #e8eaed;
}

.btn-outline {
    background-color: transparent;
    color: #1a73e8;
    border: 1px solid #1a73e8;
}

.btn-outline:hover {
    background-color: rgba(26, 115, 232, 0.1);
}

.btn-danger {
    background-color: #d93025;
}

.btn-danger:hover {
    background-color: #b31412;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.btn-group .btn {
    flex: 1;
}

/* ---------- 表单 ---------- */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #5f6368;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.captcha-group {
    display: flex;
    gap: 10px;
}

.captcha-group input {
    flex: 2;
}

.captcha-group .btn {
    flex: 1;
}

/* ---------- 卡片 ---------- */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 28px;
    margin-bottom: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 18px;
    color: #202124;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f3f4;
}

/* ---------- 通知条 ---------- */
.notification {
    background-color: #e8f0fe;
    border-left: 4px solid #1a73e8;
    padding: 18px;
    margin-bottom: 18px;
    border-radius: 4px;
    font-size: 14px;
}

.notification-warning {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
}

.notification-danger {
    background-color: #fce8e6;
    border-left: 4px solid #d93025;
}

.info-text {
    margin-top: 24px;
    font-size: 14px;
    color: #5f6368;
}

/* ---------- Toast 提示 ---------- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 220px;
    max-width: 360px;
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
    transition: opacity 0.3s ease;
}

.toast-success {
    background-color: #1e8e3e;
}

.toast-error {
    background-color: #d93025;
}

.toast-out {
    opacity: 0;
}

/* ---------- 顶栏导航 ---------- */
.header {
    background-color: #fff;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
}

.logo {
    font-size: 18px;
    font-weight: bold;
    color: #1a73e8;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    margin-left: 0;
    color: #5f6368;
    font-size: 14px;
}

.nav-links a:hover {
    color: #1a73e8;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 8px 0;
    margin-top: 5px;
    display: none;
    z-index: 100;
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    margin: 0;
    color: #202124;
}

.dropdown-menu a:hover {
    background-color: #f1f3f4;
    color: #1a73e8;
}

.dropdown.active .dropdown-menu {
    display: block;
    animation: fadeIn 0.3s ease;
}

.hamburger-menu {
    background: none;
    border: none;
    font-size: 24px;
    color: #1a73e8;
    padding: 0 16px;
    cursor: pointer;
}

.mobile-nav {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 16px;
    display: none;
    z-index: 200;
}

.mobile-nav a {
    display: block;
    padding: 10px 0;
    color: #5f6368;
    font-size: 14px;
}

.mobile-nav .dropdown-menu {
    position: static;
    box-shadow: none;
    border-top: 1px solid #eee;
    padding: 0 0 0 16px;
    min-width: 100%;
}

.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

/* ---------- 模态框 ---------- */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    padding: 25px;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #5f6368;
}

.modal-header {
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f3f4;
    margin-bottom: 15px;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #202124;
    margin: 0;
}

.modal-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-step {
    display: none;
}

.modal-step.active {
    display: block;
    animation: fadeInUp 0.5s ease forwards;
}

.checkbox-group {
    margin: 20px 0;
    display: flex;
    align-items: center;
}

.checkbox-group input {
    margin-right: 10px;
}

.verification-group {
    margin: 15px 0;
}

.verification-group label {
    font-size: 14px;
    color: #5f6368;
}

.verification-group input {
    width: 100%;
    padding: 10px 12px;
    margin-top: 8px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    background: transparent;
}

.verification-group input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.error-message {
    color: #d93025;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

/* ---------- 认证页（登录/注册/找回密码） ---------- */
.auth-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../img/bg1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #f5f5f5;
    color: #333;
    overflow: hidden;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.auth-card {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 30px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    margin: 0 auto;
    position: relative;
    backdrop-filter: blur(5px);
    transform: translateZ(0);
    will-change: transform;
    /* 上下顶满屏幕，footer 固定靠底 */
    min-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.auth-card h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #202124;
    animation-delay: 0.1s;
}

/* 认证页提交按钮占满卡片宽度 */
.auth-card form > button[type="submit"] {
    width: 100%;
    margin-top: 10px;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
}

.auth-footer {
    margin-top: auto; /* 推到卡片底部，不再与内容重叠 */
    padding-top: 15px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.7);
    text-align: center;
}

.terms {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
    margin: 15px 0;
    text-align: center;
}

.login-link {
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
}

.back-link {
    position: absolute;
    top: 15px;
    left: 20px;
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.back-link:hover {
    color: #333;
}

/* ---------- 仪表盘 ---------- */
.welcome {
    font-size: 24px;
    margin-bottom: 28px;
    color: #202124;
}

.dashboard {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
}

.user-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.info-item {
    margin-bottom: 14px;
}

.info-label {
    font-size: 14px;
    color: #5f6368;
    margin-bottom: 3px;
}

.info-value {
    font-size: 14px;
    color: #202124;
}

.service-list {
    list-style: none;
}

.service-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.service-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

.dot-active {
    background-color: #1e8e3e;
}

.dot-inactive {
    background-color: #9aa0a6;
}

.service-link {
    color: #1a73e8;
    font-size: 14px;
}

.domain-section {
    text-align: center;
    padding: 20px 0;
    color: #5f6368;
    font-size: 14px;
}

.domain-icon {
    text-align: center;
    margin-bottom: 10px;
}

.domain-icon svg {
    color: #80868b;
}

/* ---------- 头像 ---------- */
.avatar-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #e8f0fe;
    color: #1a73e8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar svg {
    width: 40px;
    height: 40px;
}

.avatar-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 10px auto 20px;
    background-color: #e8f0fe;
    color: #1a73e8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview svg {
    width: 48px;
    height: 48px;
}

.avatar-hint {
    font-size: 13px;
    color: #5f6368;
    text-align: center;
    margin-top: 10px;
}

/* ---------- 反馈页 ---------- */
.file-upload {
    border: 1px dashed #dadce0;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-upload:hover {
    border-color: #1a73e8;
}

.file-upload input {
    display: none;
}

.file-icon {
    margin-bottom: 10px;
}

.file-icon svg {
    color: #5f6368;
}

.file-text {
    font-size: 14px;
    color: #5f6368;
}

.file-text strong {
    color: #1a73e8;
}

.feedback-status {
    margin-top: 15px;
    padding: 15px;
    border-radius: 4px;
    display: none;
    font-size: 14px;
}

.feedback-status.success {
    background-color: #e6f4ea;
    color: #137333;
    border: 1px solid #c6e0b3;
}

.feedback-status.error {
    background-color: #fce8e6;
    color: #d93025;
    border: 1px solid #f8d7da;
}

/* ---------- 即将上线页 ---------- */
.coming-soon-icon {
    margin: 20px 0;
}

.coming-soon-icon svg {
    color: #1a73e8;
}

.coming-soon-text {
    font-size: 16px;
    color: #5f6368;
    line-height: 1.8;
    margin-bottom: 30px;
}

.estimated-date {
    display: inline-block;
    background-color: #e8f0fe;
    color: #1a73e8;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 14px;
    margin-bottom: 20px;
}

.contact-info {
    font-size: 14px;
    color: #80868b;
    margin-top: 30px;
}

/* ---------- 条款/政策正文 ---------- */
.terms-content h3 {
    margin: 20px 0 10px;
    color: #202124;
    font-size: 16px;
}

.terms-content p {
    margin-bottom: 15px;
    font-size: 14px;
    color: #5f6368;
    line-height: 1.8;
}

.terms-content ul {
    margin: 10px 0 15px 20px;
}

.terms-content li {
    margin-bottom: 8px;
    font-size: 14px;
    color: #5f6368;
}

.last-updated {
    font-size: 13px;
    color: #80868b;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #f1f3f4;
}

/* ---------- 应用页（仪表盘等）玻璃风格 ---------- */
.app-page {
    background-image: url('../img/bg1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #eef1f5;
    min-height: 100vh;
}

.app-page .header {
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.4s ease;
}

.app-page .card {
    background-color: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-page .dropdown-menu,
.app-page .mobile-nav {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.app-page .modal-content {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ---------- 加载页 ---------- */
.loading-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
}

.loading-container {
    text-align: center;
    padding: 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 320px;
    width: 90%;
}

.loading-text {
    color: #202124;
    font-size: 16px;
    margin-top: 16px;
}
