/* 登录页面特有样式 - index.css */

/* 主容器 */
.container {
    position: relative;
    z-index: 1;
    width: 70vw;
    max-width: 480px;
    margin: 40px auto;
    perspective: 1000px;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 230, 240, 0.3), rgba(230, 247, 255, 0.3));
    z-index: 2;
    border-radius: 20px;
    pointer-events: none;
}

/* 手绘风格卡片 */
.card {
    background: linear-gradient(135deg, 
        var(--sky-light) 0%, 
        var(--pink-light) 100%);
    border: 3px solid var(--pink-medium);
    border-radius: 40px;
    padding: 60px 48px;
    box-shadow: 
        0 8px 20px rgba(255, 179, 209, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), 
                box-shadow 0.6s ease;
    animation: cardAppear 1s ease-out;
    position: relative;
    z-index: 3;
}

/* 手绘装饰元素 */
.hand-drawn-decoration {
    position: absolute;
    z-index: -1;
    opacity: 0.6;
    animation: float 15s ease-in-out infinite;
}

.decoration-cloud {
    top: -15px;
    right: -15px;
    width: 80px;
    height: 48px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 60"><path d="M10,30 Q20,10 35,20 Q50,10 65,20 Q80,10 90,30 Q85,50 70,45 Q55,50 40,45 Q25,50 10,30" fill="%23b3e0ff"/></svg>');
    animation-delay: 0s;
}

.decoration-star {
    bottom: -8px;
    left: -8px;
    width: 48px;
    height: 48px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><path d="M30,5 L35,20 L50,20 L40,30 L45,45 L30,35 L15,45 L20,30 L10,20 L25,20 Z" fill="%23ffb3d1"/></svg>');
    animation-delay: 5s;
}

/* 简笔Q版卡通人物形象 */
.cartoon-character {
    position: absolute;
    width: 80px;
    height: 80px;
    background-size: contain;
    background-repeat: no-repeat;
    animation: characterFloat 8s ease-in-out infinite;
}

.character-1 {
    top: -30px;
    left: -30px;
    background-image: url('../media/image/girl.webp');
    animation-delay: 0s;
}

.character-2 {
    bottom: -30px;
    right: -30px;
    background-image: url('../media/image/girl2.webp');
    animation-delay: 2s;
}

@keyframes characterFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(10px) rotate(-5deg);
    }
}

.card::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, var(--pink-medium), var(--sky-medium), var(--yellow-medium), var(--pink-medium));
    border-radius: 45px;
    z-index: 0;
    opacity: 0.5;
    animation: borderShine 3s ease-in-out infinite;
}

@keyframes borderShine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: translateY(40px) rotateX(10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.card:hover {
    transform: translateY(-8px) rotateX(2deg) scale(1.02);
    box-shadow: 
        0 12px 30px rgba(255, 179, 209, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}

/* Logo区域 */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
    z-index: 3;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    position: relative;
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px var(--green-glow));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 40px var(--green-glow));
    }
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.title {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--pink-dark) 0%, var(--sky-dark) 50%, var(--yellow-medium) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    animation: titleShine 3s ease-in-out infinite;
    text-shadow: 2px 2px 4px rgba(255, 179, 209, 0.3);
}

@keyframes titleShine {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 10px rgba(255, 179, 209, 0.5));
    }
    50% {
        filter: brightness(1.2) drop-shadow(0 0 15px rgba(255, 179, 209, 0.8));
    }
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: none;
    font-style: italic;
}

.welcome-text {
    font-size: 18px;
    color: var(--pink-dark);
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(255, 179, 209, 0.3);
    animation: welcomeFloat 3s ease-in-out infinite;
}

@keyframes welcomeFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* 输入区域 */
.input-section {
    margin-bottom: 32px;
}

.input-group {
    position: relative;
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    padding: 20px 24px 20px 56px;
    background: var(--yellow-light);
    border: 3px solid var(--pink-medium);
    border-radius: 24px;
    font-size: 16px;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    outline: none;
    box-shadow: 0 2px 8px rgba(255, 179, 209, 0.2);
}

.input-field::placeholder {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    font-style: italic;
}

.input-field:focus {
    background: #ffffff;
    border-color: var(--sky-medium);
    box-shadow: 
        0 0 0 4px rgba(179, 224, 255, 0.3),
        0 4px 16px rgba(179, 224, 255, 0.4);
    transform: translateY(-2px) scale(1.02);
}

.input-field:focus::placeholder {
    color: var(--text-secondary);
    transform: translateX(10px);
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: var(--pink-medium);
    transition: all 0.3s ease;
}

.input-field:focus + .input-icon,
.input-group:focus-within .input-icon {
    color: var(--sky-dark);
    transform: translateY(-50%) scale(1.2) rotate(10deg);
}

/* 输入框光效 */
.input-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    background: linear-gradient(135deg, 
        rgba(179, 224, 255, 0.3) 0%, 
        transparent 50%, 
        rgba(255, 179, 209, 0.3) 100%);
}

.input-group:focus-within .input-glow {
    opacity: 1;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    padding: 20px 32px;
    background: linear-gradient(135deg, 
        var(--pink-medium) 0%, 
        var(--sky-medium) 50%, 
        var(--yellow-medium) 100%);
    background-size: 200% 200%;
    border: 3px solid var(--pink-dark);
    border-radius: 24px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: 
        0 6px 20px rgba(255, 179, 209, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.submit-btn:hover {
    background-position: 100% 0;
    transform: translateY(-3px) scale(1.05) rotate(1deg);
    box-shadow: 
        0 10px 30px rgba(255, 179, 209, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.7) inset,
        0 0 40px rgba(179, 224, 255, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.6), 
        transparent);
    transition: left 0.8s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

/* 按钮文字 */
.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(255, 179, 209, 0.5);
}

.btn-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-icon {
    transform: translateX(6px) rotate(15deg) scale(1.2);
}

/* 底部链接 */
.footer-links {
    display: flex;
    justify-content: end;
    gap: 24px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px dashed var(--pink-medium);
}

.footer-link {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pink-medium), var(--sky-medium));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.footer-link:hover {
    color: var(--pink-dark);
    transform: translateY(-2px) scale(1.05);
}

.footer-link:hover::after {
    width: 100%;
}

/* 加载动画 */
.loading-spinner {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid var(--pink-light);
    border-top-color: var(--sky-medium);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 10px rgba(179, 224, 255, 0.5);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.submit-btn.loading .btn-text {
    display: none;
}

.submit-btn.loading .loading-spinner {
    display: inline-block;
}

/* 成功状态 */
.success-check {
    display: none;
    width: 32px;
    height: 32px;
    color: var(--pink-dark);
    filter: drop-shadow(0 0 8px rgba(255, 179, 209, 0.8));
}

.submit-btn.success .btn-text,
.submit-btn.success .loading-spinner {
    display: none;
}

.submit-btn.success .success-check {
    display: inline-block;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* 装饰线条 */
.decoration-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 40px;
}

.line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--pink-medium), transparent);
    height: 2px;
    width: 100%;
    animation: lineMove 8s linear infinite;
    border-radius: 1px;
}

.line-1 { top: 20%; animation-delay: 0s; }
.line-2 { top: 50%; animation-delay: -2s; }
.line-3 { top: 80%; animation-delay: -4s; }

@keyframes lineMove {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        max-width: 90%;
    }
    
    .card {
        padding: 50px 36px;
        border-radius: 32px;
    }
    
    .welcome-text {
        font-size: 16px;
    }
    
    .title {
        font-size: 32px;
    }
}

@media (max-width: 520px) {
    .container {
        max-width: 95%;
    }
    
    .card {
        padding: 40px 28px;
        border-radius: 24px;
    }

    .welcome-text {
        font-size: 14px;
    }
    
    .title {
        font-size: 28px;
    }

    .logo-icon {
        width: 64px;
        height: 64px;
    }

    .input-field {
        padding: 16px 20px 16px 52px;
        border-radius: 20px;
    }

    .submit-btn {
        padding: 18px 24px;
        border-radius: 20px;
    }
    
    .cartoon-character {
        width: 60px;
        height: 60px;
    }
    
    .character-1 {
        top: -30px;
        left: -30px;
    }
    
    .character-2 {
        bottom: -30px;
        right: -30px;
    }
}

@media (max-width: 360px) {
    .card {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .welcome-text {
        font-size: 12px;
    }
    
    .title {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .input-field {
        padding: 14px 18px 14px 48px;
        border-radius: 16px;
    }
    
    .submit-btn {
        padding: 16px 20px;
        border-radius: 16px;
    }
}
