/* ============================================
   StockAI - 主样式文件
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px 20px 40px;
    margin: 0;
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding-top: 20px;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* ============================================
   Logo 样式
   ============================================ */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.logo-text {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   标题和副标题
   ============================================ */
h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    line-height: 1.3;
}

h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
}

.subtitle {
    color: #718096;
    font-size: 15px;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* ============================================
   特性标签
   ============================================ */
.features {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.feature i {
    font-size: 24px;
    color: #667eea;
}

.feature-text {
    font-size: 12px;
    color: #4a5568;
    font-weight: 600;
}

/* ============================================
   步骤指示器
   ============================================ */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.step {
    width: 40px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.step.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ============================================
   输入框样式
   ============================================ */
.input-container {
    margin-bottom: 20px;
}

.code-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
}

.code-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.code-input.invalid {
    border-color: #fc8181;
    animation: shake 0.5s;
}

.input-hint {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 8px;
}

.error-message {
    color: #fc8181;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

/* ============================================
   按钮样式
   ============================================ */
.btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.4);
}

/* ============================================
   信任标签
   ============================================ */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #718096;
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 8px;
}

.trust-badge i {
    color: #667eea;
    font-size: 14px;
}

/* ============================================
   加载动画
   ============================================ */
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   成功动画
   ============================================ */
.success-animation {
    margin: 0 auto 30px;
    width: 80px;
    height: 80px;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #4CAF50;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #4CAF50;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #4CAF50;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #4CAF50;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

/* ============================================
   结果显示
   ============================================ */
.result-message {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 10px;
}

.code-display {
    color: #667eea;
    font-weight: 700;
    text-transform: uppercase;
}

/* ============================================
   免责声明
   ============================================ */
.disclaimer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    font-size: 11px;
    color: #a0aec0;
    line-height: 1.5;
}

/* ============================================
   显示/隐藏动画
   ============================================ */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 600px) {
    .card {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
    
    .logo-text {
        font-size: 28px;
    }
    
    .features {
        gap: 15px;
    }
    
    .trust-badges {
        gap: 10px;
    }
}
