/*
 * 九世呓语 - Main Style Sheet
 * Author: Antigravity Team & Yvon Shong
 * Version: 2.0
 */

/* Import Google Fonts directly */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;500;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-light: #f8fafc;
    --card-bg-glass: rgba(255, 255, 255, 0.75);
    --border-glass: rgba(15, 23, 42, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-indigo: #4f46e5;
    --accent-purple: #7c3aed;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --in-oklch: ;
}

@supports (linear-gradient(in oklch, white, black)) {
    :root {
        --in-oklch: in oklch;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.12);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.25);
}

/* Base resets & styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-light);
    background-image: radial-gradient(circle at 50% 0% var(--in-oklch), oklch(0.98 0.008 240) 0%, oklch(0.94 0.012 240) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    letter-spacing: 0.2px;
}

html {
    -ms-overflow-style: scrollbar;
}

a {
    color: var(--accent-indigo);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover,
a:focus {
    color: var(--accent-purple);
    outline: none;
    text-decoration: none;
}

button:hover,
button:focus {
    outline: none;
}

/* Ambient glow blobs */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
    transition: opacity 1s ease;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 70%);
    top: -10%;
    left: -10%;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    bottom: -10%;
    right: -10%;
}

/* Header section */
.team-main {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.header-section {
    margin-bottom: 60px;
    text-align: center;
}

.header-section .title-wb {
    font-family: 'Noto Serif SC', serif;
    font-weight: 700;
    font-size: 3.5rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #0f172a 30%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 4px;
    text-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.header-section .subtitle-wb {
    font-family: 'Noto Serif SC', serif;
    font-weight: 300;
    font-size: 1.15rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Dynamic Interactive Cards (Diary and Youth Quotes) */
.newcard {
    perspective: 1500px;
    height: 440px;
    margin-bottom: 20px;
    border: none;
    background: transparent;
}

.newcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    transform-style: preserve-3d;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08), 0 0 40px rgba(99, 102, 241, 0.03);
}

.newcard:hover .newcard-inner {
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12), 0 0 50px rgba(99, 102, 241, 0.08);
}

.newcard.active .newcard-inner {
    transform: rotateY(180deg);
}

.newcard .front-A,
.newcard-img-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 24px;
    overflow: hidden;
}

.newcard .front-A {
    z-index: 2;
    transform: rotateY(0deg);
}

/* Card front side filter and text styling */
.profile-card-5 {
    height: 100%;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: none;
    background-color: #f1f5f9;
}

.profile-card-5 .filter {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.1) 50%, transparent 100%);
    z-index: 2;
    transition: background 0.4s ease;
}

.newcard:hover .profile-card-5 .filter {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.3) 0%, rgba(15, 23, 42, 0.05) 50%, transparent 100%);
}

.profile-card-5 .card-hint {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 3;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 30px;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.newcard:hover .card-hint {
    background: rgba(79, 70, 229, 0.85);
    border-color: rgba(79, 70, 229, 0.3);
    transform: translateY(-2px);
}

.profile-card-5 .text-content {
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 3;
    padding: 40px;
    box-sizing: border-box;
}

.profile-card-5 .text-content h3 {
    font-family: 'Noto Serif SC', serif;
    font-weight: 700;
    font-size: 2rem;
    color: #ffffff;
    margin: 0 0 10px;
    text-align: center;
    letter-spacing: 1px;
}

.profile-card-5 .text-content p {
    text-align: center;
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
    font-weight: 300;
}

/* Card back side (Quote Overlay) */
.newcard-img-overlay {
    transform: rotateY(180deg);
    background: var(--card-bg-glass);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-glass);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 10px 30px rgba(15, 23, 42, 0.05);
    padding: 65px 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

.newcard-img-overlay .quote-icon {
    font-size: 2.5rem;
    color: rgba(79, 70, 229, 0.25);
    margin-bottom: 20px;
}

.newcard-img-overlay .card-text {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.1rem;
    color: #1e293b;
    line-height: 1.8;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
    width: 100%;
    padding: 0 10px;
    /* Custom inner scrollbar for quotes */
}

.newcard-img-overlay .card-text::-webkit-scrollbar {
    width: 4px;
}
.newcard-img-overlay .card-text::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.12);
    border-radius: 2px;
}

.newcard-img-overlay .flip-back-hint {
    position: absolute;
    top: 25px;
    right: 25px;
    margin-top: 0;
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #475569;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.newcard-img-overlay .flip-back-hint:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.15);
    transform: translateY(-2px);
}


/* Static Info Cards Section */
.image-flip {
    perspective: 1500px;
    height: 280px;
    margin-bottom: 20px;
}

.flip-postfix {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
}

.image-flip:hover .flip-postfix,
.image-flip.hover .flip-postfix {
    transform: rotateY(180deg);
}

.image-flip .front-A,
.image-flip .back-b {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    margin: 0;
}

.image-flip .front-A {
    z-index: 2;
    transform: rotateY(0deg);
}

.image-flip .back-b {
    transform: rotateY(180deg);
    background: var(--card-bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

/* Info front card details */
.profile-card-6 {
    height: 100%;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: none;
    background-color: #f1f5f9;
}

.profile-card-6 .filter {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
    z-index: 2;
}

.profile-card-6 .text-content {
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 3;
    padding: 25px;
    box-sizing: border-box;
}

.profile-card-6 .text-content h3 {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 5px;
    text-align: left;
    letter-spacing: 0.5px;
}

.profile-card-6 .text-content p {
    text-align: left;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.85rem;
    font-weight: 300;
}

/* Info back card details */
.back-b .card {
    background: transparent;
    border: none;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    color: #1e293b;
}

.back-b .card h4.card-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 6px;
    letter-spacing: 0.5px;
}

.back-b .card .card-desc {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.back-b .card p.card-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #334155;
    margin: 0 0 15px;
    flex-grow: 1;
    overflow-y: auto;
}

.back-b .card p.card-text::-webkit-scrollbar {
    width: 3px;
}
.back-b .card p.card-text::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.12);
    border-radius: 1px;
}

/* Action Buttons & Grouping */
.card-action,
.card-actions-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155 !important;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(15, 23, 42, 0.03);
    box-sizing: border-box;
    cursor: pointer;
}

.btn-action i {
    font-size: 0.95rem;
}

.btn-bilibili:hover {
    background: linear-gradient(135deg, #fb7299, #ff5c7c);
    border-color: transparent;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(251, 114, 153, 0.3);
    transform: translateY(-2px);
}

.btn-feishu:hover {
    background: linear-gradient(135deg, #3370ff, #1c52d9);
    border-color: transparent;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(51, 112, 255, 0.3);
    transform: translateY(-2px);
}

.btn-download:hover {
    background: linear-gradient(135deg, #00b0ff, #0081cb);
    border-color: transparent;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 176, 255, 0.3);
    transform: translateY(-2px);
}

.btn-read:hover {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border-color: transparent;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

/* Yvon Shong Profile Social Icons */
.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 15px 0 0;
    padding-left: 0;
    list-style: none;
}

.social-links .list-inline-item {
    margin: 0;
}

.social-links .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.06);
    color: #475569 !important;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.social-links .social-icon:hover {
    background: rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.15);
    color: #0f172a !important;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Footer Section */
.footer-section {
    position: relative;
    z-index: 1;
    margin-top: 60px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 30px;
}

.footer-section .copyright {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 300;
    margin: 0;
}

/* Responsive Overrides */
@media (max-width: 991px) {
    .header-section .title-wb {
        font-size: 2.8rem;
    }
    
    .newcard {
        height: 420px;
    }
    
    .image-flip {
        height: 280px;
    }
}

@media (max-width: 575px) {
    .header-section .title-wb {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
    
    .header-section .subtitle-wb {
        font-size: 0.95rem;
    }
    
    .newcard {
        height: 400px;
    }
    
    .newcard-img-overlay {
        padding: 30px 20px;
    }
    
    .newcard-img-overlay .card-text {
        font-size: 1rem;
    }
    
    .image-flip {
        height: 300px; /* give slightly more height on small mobile */
    }
}