/* ===================================
   门户页面样式 - 现代风格
   =================================== */

/* CSS 变量 */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --accent-color: #8b5cf6;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 背景装饰 */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(60px);
    animation: float 20s ease-in-out infinite;
}

.bg-circle-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(139, 92, 246, 0.3));
    animation-delay: 0s;
}

.bg-circle-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -50px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.3));
    animation-delay: -7s;
}

.bg-circle-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.3), rgba(59, 130, 246, 0.3));
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(20px, 30px) scale(1.02);
    }
}

/* 主容器 */
.portal-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部 */
.portal-header {
    text-align: center;
    padding: 60px 20px 40px;
    margin-bottom: 40px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    animation: fadeInDown 0.8s ease-out;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
}

.logo-text {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* 动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 主内容区 */
.portal-main {
    flex: 1;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    padding: 10px;
}

/* 站点卡片 */
.site-card {
    position: relative;
    display: block;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-xl);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    animation: cardEntrance 0.6s ease-out backwards;
}

.site-card:nth-child(1) { animation-delay: 0.5s; }
.site-card:nth-child(2) { animation-delay: 0.6s; }
.site-card:nth-child(3) { animation-delay: 0.7s; }

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.site-card.coming-soon {
    opacity: 0.7;
    cursor: default;
}

.site-card.coming-soon:hover {
    transform: none;
    box-shadow: var(--shadow-xl);
}

.site-card-content {
    position: relative;
    z-index: 2;
    padding: 28px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

/* 站点图标 */
.site-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    transition: var(--transition);
}

.site-icon.personal {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.site-icon.wedding {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    color: white;
}

.site-icon.coming {
    background: linear-gradient(135deg, #64748b, #94a3b8);
    color: white;
}

.site-card:hover .site-icon {
    transform: scale(1.1) rotate(5deg);
}

/* 站点信息 */
.site-info {
    flex: 1;
    min-width: 0;
}

.site-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: var(--transition);
}

.site-card:hover .site-info h3 {
    color: var(--primary-color);
}

.site-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-url {
    display: inline-block;
    font-size: 12px;
    font-family: 'Roboto Mono', monospace;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* 箭头 */
.site-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 16px;
    transition: var(--transition);
}

.site-card:hover .site-arrow {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    transform: translateX(5px);
}

.site-card.coming-soon .site-arrow {
    background: var(--bg-secondary);
    color: var(--text-muted);
}

/* 卡片背景效果 */
.site-card-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, transparent, rgba(99, 102, 241, 0.1));
    border-radius: 0 0 0 100%;
    transition: var(--transition);
    pointer-events: none;
}

.site-card:hover .site-card-bg {
    background: linear-gradient(135deg, transparent, rgba(99, 102, 241, 0.2));
    transform: scale(1.1);
}

/* 页脚 */
.portal-footer {
    text-align: center;
    padding: 40px 20px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.portal-footer p {
    margin-bottom: 8px;
}

.footer-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .portal-container {
        padding: 20px 16px;
    }

    .portal-header {
        padding: 40px 16px 30px;
    }

    .logo-text {
        font-size: 28px;
    }

    .logo-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .tagline {
        font-size: 16px;
    }

    .sites-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .site-card-content {
        padding: 20px;
        gap: 16px;
    }

    .site-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .site-info h3 {
        font-size: 18px;
    }

    .site-info p {
        font-size: 13px;
    }

    .bg-circle-1 {
        width: 250px;
        height: 250px;
    }

    .bg-circle-2 {
        width: 200px;
        height: 200px;
    }

    .bg-circle-3 {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 8px;
    }

    .logo-text {
        font-size: 24px;
    }

    .site-card-content {
        flex-wrap: wrap;
    }

    .site-arrow {
        width: 100%;
        border-radius: var(--radius-md);
        margin-top: 10px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #64748b;
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --border-color: #334155;
    }

    .site-card {
        background: rgba(30, 41, 59, 0.95);
    }

    .site-info h3 {
        color: var(--text-primary);
    }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
