/* ========================================
   Gemini 学生资格验证系统 - 优化版
   采用现代科技感 + 专业教育风格
   ======================================== */

/* Google Fonts - Outfit: 现代、几何、专业 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Gemini 品牌色系 - 蓝色主题 */
    --primary-blue: #4285f4;
    --primary-light: #8AB4F8;
    --primary-dark: #1a73e8;
    --accent-green: #34a853;
    --accent-yellow: #fbbc04;
    --accent-red: #ea4335;

    /* 渐变 */
    --primary-gradient: linear-gradient(135deg, #4285f4 0%, #8AB4F8 60%, #669DF6 100%);
    --success-gradient: linear-gradient(135deg, #34a853 0%, #66bb6a 100%);
    --error-gradient: linear-gradient(135deg, #ea4335 0%, #f28b82 100%);
    --glass-gradient: linear-gradient(135deg, rgba(66, 133, 244, 0.1) 0%, rgba(138, 180, 248, 0.05) 100%);

    /* 背景 */
    --bg-dark: #0a0e1a;
    --bg-darker: #050810;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(18, 25, 43, 0.8);

    /* 文字 */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.78);
    --text-muted: rgba(255, 255, 255, 0.52);
    --text-accent: #8AB4F8;

    /* 边框 */
    --border-color: rgba(138, 180, 248, 0.12);
    --border-color-bright: rgba(138, 180, 248, 0.35);
    --border-radius: 20px;
    --border-radius-sm: 14px;
    --border-radius-lg: 28px;

    /* 阴影 */
    --shadow-glow: 0 0 60px rgba(66, 133, 244, 0.35);
    --shadow-glow-strong: 0 0 80px rgba(66, 133, 244, 0.55);
    --shadow-card: 0 12px 48px rgba(0, 0, 0, 0.45);
    --shadow-card-hover: 0 20px 64px rgba(0, 0, 0, 0.6);
    --shadow-inset: inset 0 1px 1px rgba(255, 255, 255, 0.1);

    /* 过渡 */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.65;
    position: relative;
    font-weight: 400;
}

/* ========================================
   Enhanced Background Animation
   ======================================== */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(ellipse 800px 600px at 20% 30%, rgba(66, 133, 244, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 900px 700px at 80% 70%, rgba(138, 180, 248, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse 600px 500px at 50% 50%, rgba(52, 168, 83, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, #0a0e1a 0%, #050810 100%);
    animation: bgPulse 12s ease-in-out infinite alternate;
}

/* 添加移动的光点效果 */
.background-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 40%, rgba(66, 133, 244, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 70% 60%, rgba(138, 180, 248, 0.12) 0%, transparent 25%);
    animation: floatOrbs 20s linear infinite;
}

@keyframes bgPulse {
    0% {
        opacity: 0.85;
        transform: scale(1);
    }

    100% {
        opacity: 1;
        transform: scale(1.08);
    }
}

@keyframes floatOrbs {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(5%, 5%) rotate(360deg);
    }
}

/* ========================================
   Container & Layout
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 30px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   Header - Gemini 风格
   ======================================== */
.header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-size: 2.4rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    filter: drop-shadow(0 0 20px rgba(66, 133, 244, 0.4));
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
    opacity: 0.9;
}

/* ========================================
   Main Layout - 左右分栏
   ======================================== */
.main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 35px;
    align-items: start;
    animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.verification-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ========================================
   Guide Sidebar - Glassmorphism
   ======================================== */
.guide-sidebar {
    position: sticky;
    top: 30px;
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.guide-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 30px;
    border: 1px solid var(--border-color-bright);
    box-shadow: var(--shadow-card), var(--shadow-inset);
    position: relative;
    overflow: hidden;
}

/* 添加光泽效果 */
.guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(138, 180, 248, 0.6), transparent);
}

.guide-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 25px 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.guide-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.guide-step {
    padding: 18px;
    background: rgba(66, 133, 244, 0.06);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid transparent;
    transition: all var(--transition-smooth);
    position: relative;
}

.guide-step:hover {
    background: rgba(66, 133, 244, 0.1);
    transform: translateX(4px);
}

.guide-step.active {
    background: rgba(66, 133, 244, 0.12);
    border-left-color: var(--primary-blue);
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.2);
}

.guide-step .step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.guide-step .step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
}

.guide-step .step-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.step-desc {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

.sub-steps {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 12px;
    border-left: 2px solid rgba(138, 180, 248, 0.2);
}

.sub-step {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sub-step strong {
    color: var(--text-accent);
    font-weight: 600;
}

.link-btn {
    padding: 10px 20px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all var(--transition-smooth);
    align-self: flex-start;
    margin-top: 6px;
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.35);
    font-family: inherit;
}

.link-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(66, 133, 244, 0.5);
}

.link-btn:active {
    transform: translateY(-1px);
}

.guide-note {
    padding: 14px 16px;
    background: rgba(52, 168, 83, 0.12);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--accent-green);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.guide-note.warning {
    background: rgba(251, 188, 4, 0.12);
    border-left-color: var(--accent-yellow);
}

.guide-note strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

/* ========================================
   Steps Indicator - Enhanced
   ======================================== */
.steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 36px;
    gap: 16px;
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s backwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.35;
    transition: all var(--transition-smooth);
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 0.7;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all var(--transition-smooth);
    position: relative;
}

/* 添加脉冲动画到激活状态 */
.step.active .step-number {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: var(--shadow-glow), 0 0 0 0 rgba(66, 133, 244, 0.7);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: var(--shadow-glow), 0 0 0 0 rgba(66, 133, 244, 0.7);
    }

    50% {
        box-shadow: var(--shadow-glow-strong), 0 0 0 15px rgba(66, 133, 244, 0);
    }
}

.step.completed .step-number {
    background: var(--success-gradient);
    border-color: transparent;
    box-shadow: 0 0 30px rgba(52, 168, 83, 0.4);
}

/* 添加完成图标 */
.step.completed .step-number::after {
    content: '✓';
    position: absolute;
    font-size: 1.2rem;
}

.step-label {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.step.active .step-label {
    color: var(--text-accent);
    font-weight: 600;
}

.step-line {
    width: 80px;
    height: 3px;
    background: var(--border-color);
    border-radius: 2px;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.step-line.active {
    background: var(--primary-gradient);
}

/* 添加流动效果 */
.step-line.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

/* ========================================
   Cards - Glassmorphism Enhanced
   ======================================== */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color-bright);
    border-radius: var(--border-radius-lg);
    padding: 35px;
    margin-bottom: 20px;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-card), var(--shadow-inset);
    position: relative;
    overflow: hidden;
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 顶部光泽 */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(138, 180, 248, 0.7), transparent);
}

.card:hover:not(.disabled) {
    background: rgba(18, 25, 43, 0.85);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover), var(--shadow-inset);
    border-color: rgba(138, 180, 248, 0.5);
}

.card.disabled {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(0.6);
}

.card.active {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.card-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 8px rgba(66, 133, 244, 0.3));
}

.card-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ========================================
   Input Fields - Modern Style
   ======================================== */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-field {
    width: 100%;
    padding: 18px 56px 18px 22px;
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 1.02rem;
    font-family: 'JetBrains Mono', monospace;
    transition: all var(--transition-smooth);
    outline: none;
}

.input-field::placeholder {
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
}

.input-field:focus {
    border-color: var(--primary-blue);
    background: rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.15), 0 4px 16px rgba(66, 133, 244, 0.2);
    transform: translateY(-2px);
}

.input-field:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    opacity: 0.6;
    transition: all var(--transition-fast);
    pointer-events: none;
}

.input-field:focus+.input-icon {
    opacity: 1;
    color: var(--primary-light);
}

.hint {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    word-break: break-all;
    font-family: 'JetBrains Mono', monospace;
    opacity: 0.8;
}

/* ========================================
   Buttons - Enhanced Interaction
   ======================================== */
.btn {
    width: 100%;
    padding: 18px 28px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

/* 添加光泽效果 */
.btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 6px 24px rgba(66, 133, 244, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(66, 133, 244, 0.5);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(-1px) scale(1.01);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* ========================================
   Message Box - Enhanced
   ======================================== */
.message-box {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 0.94rem;
    font-weight: 500;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid;
    backdrop-filter: blur(10px);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-box.success {
    background: rgba(52, 168, 83, 0.15);
    border-color: var(--accent-green);
    color: #66bb6a;
    box-shadow: 0 4px 16px rgba(52, 168, 83, 0.2);
}

.message-box.error {
    background: rgba(234, 67, 53, 0.15);
    border-color: var(--accent-red);
    color: #f28b82;
    box-shadow: 0 4px 16px rgba(234, 67, 53, 0.2);
}

.message-box.warning {
    background: rgba(251, 188, 4, 0.15);
    border-color: var(--accent-yellow);
    color: #fdd663;
    box-shadow: 0 4px 16px rgba(251, 188, 4, 0.2);
}

/* ========================================
   Success Card - Celebration
   ======================================== */
.success-card {
    text-align: center;
    padding: 60px 35px;
    background: linear-gradient(135deg, rgba(52, 168, 83, 0.15) 0%, rgba(102, 187, 106, 0.1) 100%);
    border-color: var(--accent-green);
    box-shadow: 0 20px 60px rgba(52, 168, 83, 0.3);
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: successBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 10px 30px rgba(52, 168, 83, 0.5));
}

@keyframes successBounce {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(0.95);
    }

    75% {
        transform: scale(1.1);
    }
}

.success-card h2 {
    font-size: 1.8rem;
    color: #66bb6a;
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.success-card p {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.verification-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
    word-break: break-all;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: var(--border-radius-sm);
    margin-top: 16px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    margin-top: auto;
    padding-top: 50px;
    text-align: center;
}

.footer p {
    font-size: 0.88rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .guide-sidebar {
        position: relative;
        top: 0;
        order: 2;
    }

    .verification-area {
        order: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }

    .logo {
        font-size: 2rem;
    }

    .card {
        padding: 25px;
    }

    .guide-card {
        padding: 22px;
    }

    .step-line {
        width: 60px;
    }

    .step-number {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.7rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .card {
        padding: 20px;
    }

    .step-line {
        width: 40px;
    }

    .guide-card {
        padding: 18px;
    }

    .input-field {
        padding: 16px 50px 16px 18px;
        font-size: 0.95rem;
    }

    .btn {
        padding: 16px 24px;
        font-size: 1rem;
    }
}

/* ========================================
   Accessibility
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(138, 180, 248, 0.4);
        --border-color-bright: rgba(138, 180, 248, 0.7);
    }

    .card {
        border-width: 2px;
    }
}