/*
 * @Description: 公共样式文件
 * @Author: lwp
 * @Date: 2025-01-27
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    background: radial-gradient(
        ellipse 130% 70% at 50% 100%,
        #0066ff 10%,
        #0080ff 20%,
        #00bfff 40%,
        #7dd3f0 60%,
        #e8f7fa 80%,
        #f5f5f5 100%
    );
    background-attachment: fixed;
}

/* 公共容器样式 */
.container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 公共按钮样式 */
.btn-primary {
    width: 18rem;
    padding: 0.75rem 1.5rem;
    background-color: #fff;
    color: #111;
    border: none;
    border-radius: 2rem;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
    margin-bottom: 1rem;
    opacity: 0.8;
    box-shadow: none;
    height: auto;
}

.btn-primary:hover {
    opacity: 1;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    width: auto;
    padding: 0.5rem 1.5rem;
    background: transparent;
    color: #111;
    border: none;
    border-radius: 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    margin-bottom: 1rem;
    opacity: 0.6;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.btn-secondary:hover {
    opacity: 1;
    background: transparent;
}

/* 公共输入框样式 */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="email"],
textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: rgba(0, 0, 0, 0.3);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

input[type="text"]::placeholder,
input[type="number"]::placeholder,
input[type="date"]::placeholder,
input[type="tel"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
    color: #aaa;
}

/* 公共消息提示样式 */
.error-message {
    color: #ff6b6b;
    text-align: center;
    margin-top: 1rem;
    padding: 0.5rem;
    background: transparent;
    border-radius: 0;
    border: none;
    display: none;
    font-size: 0.9rem;
}

.success-message {
    color: #51cf66;
    text-align: center;
    margin-top: 1rem;
    padding: 0.5rem;
    background: transparent;
    border-radius: 0;
    border: none;
    display: none;
    font-size: 0.9rem;
}

/* 公共头部样式 */
.common-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0 20px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.header-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: #111;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: opacity 0.3s ease;
    opacity: 0.7;
}

.nav-link:hover {
    opacity: 1;
}

.nav-link.active {
    opacity: 1;
    font-weight: 600;
}

/* 公共底部样式 */
.common-footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem 20px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-container p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .header-container {
        padding: 0.75rem 0;
    }
    
    .header-logo h1 {
        font-size: 1.25rem;
    }
    
    .header-nav {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
}

/* 全局通知动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

