:root {
    --bg-color: #0a0a12;
    --card-bg: #151520;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-color: #00f2ff;
    --accent-glow: rgba(0, 242, 255, 0.3);
    --card-border: #2a2a35;
    --hover-border: #00f2ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #0a0a12 100%);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    padding: 60px 0 40px;
    text-align: center;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #fff, #00f2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 300;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding-bottom: 60px;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--hover-border);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.card:hover .icon {
    transform: scale(1.1);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    word-break: break-all;
}

.preview-btn {
    margin-top: auto;
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.card:hover .preview-btn {
    background: var(--accent-color);
    color: var(--bg-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 2vh auto;
    padding: 0;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    width: 90%;
    height: 94vh; /* 几乎全屏 */
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 242, 255, 0.1);
}

.modal-header {
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    background-color: rgba(21, 21, 32, 0.9);
}

.modal-header h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.new-tab-btn {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--card-border);
    border-radius: 4px;
    transition: background 0.3s;
}

.new-tab-btn:hover {
    background: rgba(0, 242, 255, 0.1);
}

.close {
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 20px;
    transition: color 0.3s;
}

.close:hover {
    color: #fff;
}

.iframe-container {
    flex: 1;
    width: 100%;
    height: 100%;
    background: #fff; /* iframe通常是白底 */
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    margin-top: auto;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid #1f1f2b;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .logo {
        font-size: 1.8rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        height: 90vh;
        margin: 5vh auto;
    }
}

