/* common-styles.css - 公共样式文件 */
/* 顶部用户栏样式 */
.user-topbar {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: white;
    padding: 8px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1001;
}

.user-topbar-content {
    display: flex;
    align-items: center;
    gap: 25px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-right: auto;
}

.user-welcome-icon {
    font-size: 1.1rem;
}

.user-login-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.user-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.user-login-icon {
    font-size: 1.1rem;
}

.user-logged-in {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.user-dropdown {
    position: absolute;
    top: 45px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.user-dropdown-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.user-dropdown-email {
    font-size: 0.85rem;
    opacity: 0.9;
}

.user-dropdown-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8f9fa;
}

.user-stat-item {
    text-align: center;
}

.user-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
}

.user-stat-label {
    font-size: 0.7rem;
    color: #718096;
}

.user-dropdown-menu {
    padding: 10px 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.user-menu-item:hover {
    background: #f7fafc;
    color: #667eea;
}

.user-menu-item-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.user-menu-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0;
}

.user-logout-btn {
    color: #e53e3e;
}

.user-logout-btn:hover {
    background: #fed7d7;
}

/* 首页头部样式 */
.home-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px 30px;
    text-align: center;
    border-radius: 0 0 30px 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.home-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.3;
}

.home-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin-bottom: 16px;
    padding: 0px;
}

.home-logo {
    display: flex;
    align-items: center;
}

.home-logo img {
    height: 45px;
}

.home-logo-text {
    margin-left: 12px;
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

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

.home-nav-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
}

.home-nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.home-hero {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.home-cta-button {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.home-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* 通知样式 */
.user-notification {
    position: fixed;
    top: 60px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.user-notification.show {
    transform: translateX(0);
}

.notification-success {
    background: linear-gradient(135deg, #38a169, #48bb78);
    border-left: 4px solid #2f855a;
}

.notification-error {
    background: linear-gradient(135deg, #e53e3e, #fc8181);
    border-left: 4px solid #c53030;
}

.notification-info {
    background: linear-gradient(135deg, #3182ce, #63b3ed);
    border-left: 4px solid #2c5282;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .user-topbar {
        padding: 8px 15px;
    }

    .user-topbar-content {
        flex-direction: column;
        gap: 10px;
        padding: 0 15px;
    }

    .user-welcome {
        margin-right: 0;
        font-size: 0.85rem;
    }

    .user-login-status {
        width: 100%;
        justify-content: center;
    }

    .user-dropdown {
        position: fixed;
        top: 50px;
        left: 20px;
        right: 20px;
        min-width: auto;
    }

    .home-nav-links {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
    }

    .home-navbar {
        flex-direction: column;
        text-align: center;
    }

    .home-logo {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .user-login-btn {
        padding: 6px 15px;
        font-size: 0.85rem;
    }

    .home-hero {
        padding: 0 15px;
    }

    .home-cta-button {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}