/* CSS Reset and Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables */
:root {
    /* Button Colors */
    --service-btn-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --service-btn-shadow: rgba(102, 126, 234, 0.3);
    --service-btn-shadow-hover: rgba(102, 126, 234, 0.4);
    --service-btn-primary-bg: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --service-btn-primary-shadow: rgba(240, 147, 251, 0.3);
    --service-btn-primary-shadow-hover: rgba(240, 147, 251, 0.4);
    
    --resource-btn-bg: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --resource-btn-shadow: rgba(79, 172, 254, 0.3);
    --resource-btn-shadow-hover: rgba(79, 172, 254, 0.4);
    
    --collection-btn-bg: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --collection-btn-shadow: rgba(250, 112, 154, 0.3);
    --collection-btn-shadow-hover: rgba(250, 112, 154, 0.4);
    
    --spacedesk-btn-bg: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --spacedesk-btn-shadow: rgba(168, 237, 234, 0.3);
    --spacedesk-btn-shadow-hover: rgba(168, 237, 234, 0.4);
    --spacedesk-btn-primary-bg: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    --spacedesk-btn-primary-shadow: rgba(252, 182, 159, 0.3);
    
    --friend-btn-bg: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
    --friend-btn-shadow: rgba(210, 153, 194, 0.3);
    --friend-btn-shadow-hover: rgba(210, 153, 194, 0.4);
    
    /* Disabled Button Colors */
    --disabled-btn-bg: linear-gradient(135deg, #bbb 0%, #ddd 100%);
    --disabled-btn-opacity: 0.5;
    
    /* Board Border Colors */
    --service-board-border: rgba(102, 126, 234, 0.4);
    --resource-board-border: rgba(255, 107, 107, 0.4);
    --collection-board-border: rgba(250, 112, 154, 0.4);
    --spacedesk-board-border: rgba(168, 237, 234, 0.4);
    --friends-board-border: rgba(210, 153, 194, 0.4);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    background: #1a1a1a;
}

/* Background Video */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -1;
    filter: blur(2px) brightness(0.7) saturate(1.2);
    transition: filter 0.5s ease;
}

/* Main Container */
.container {
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Grid Layout */
.grid-layout {
    width: min(1200px, 95vw);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px) saturate(1.3);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Main Title */
.main-title {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    border: 2px solid rgba(101, 164, 184, 0.6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.main-title h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

/* Info Panels */
.info-panels {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 10px 0;
}

.info-panel {
    grid-column: span 2;
    min-height: 120px;
    border: none;
    border-radius: 12px;
    background: transparent;
    width: 100%;
}

/* Section Titles */
.section-title {
    grid-column: 1 / -1;
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    border: 2px solid rgba(101, 164, 184, 0.4);
    margin: 10px 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Button Base Styles */
.btn {
    display: block;
    text-decoration: none;
    text-align: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    backdrop-filter: blur(8px);
    cursor: pointer;
    color: white;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn.disabled {
    opacity: var(--disabled-btn-opacity);
    cursor: not-allowed;
    pointer-events: none;
    background: var(--disabled-btn-bg) !important;
    box-shadow: none !important;
}

.btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Service Section */
.service-btn {
    background: var(--service-btn-bg);
    box-shadow: 0 4px 12px var(--service-btn-shadow);
}

.service-btn:hover {
    box-shadow: 0 8px 20px var(--service-btn-shadow-hover);
}

.service-btn.primary {
    background: var(--service-btn-primary-bg);
    box-shadow: 0 4px 12px var(--service-btn-primary-shadow);
}

.service-btn.primary:hover {
    box-shadow: 0 8px 20px var(--service-btn-primary-shadow-hover);
}

/* Resource Section */
.resource-btn {
    background: var(--resource-btn-bg);
    box-shadow: 0 4px 12px var(--resource-btn-shadow);
}

.resource-btn:hover {
    box-shadow: 0 8px 20px var(--resource-btn-shadow-hover);
}

/* Collection Section */
.collection-btn {
    background: var(--collection-btn-bg);
    color: #333;
    box-shadow: 0 4px 12px var(--collection-btn-shadow);
    font-weight: 600;
}

.collection-btn:hover {
    box-shadow: 0 8px 20px var(--collection-btn-shadow-hover);
}

/* Spacedesk Section */
.spacedesk-btn {
    background: var(--spacedesk-btn-bg);
    color: #333;
    box-shadow: 0 4px 12px var(--spacedesk-btn-shadow);
}

.spacedesk-btn:hover {
    box-shadow: 0 8px 20px var(--spacedesk-btn-shadow-hover);
}

.spacedesk-btn.primary {
    background: var(--spacedesk-btn-primary-bg);
    box-shadow: 0 4px 12px var(--spacedesk-btn-primary-shadow);
    font-weight: 600;
}

/* Friends Section */
.friend-btn {
    background: var(--friend-btn-bg);
    color: #333;
    box-shadow: 0 4px 12px var(--friend-btn-shadow);
}

.friend-btn:hover {
    box-shadow: 0 8px 20px var(--friend-btn-shadow-hover);
}

/* Info Boards */
.info-boards {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.board {
    padding: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 2px solid rgba(101, 164, 184, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

/* Board collapse/expand - controlled by JavaScript */
.board-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-10px);
}

/* Prevent interactions when collapsed */
.board-content * {
    pointer-events: none;
}

/* Board hover effect - controlled by JavaScript */
.board {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapse indicator */
.board::after {
    content: "▼";
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    transform: rotate(var(--arrow-rotation, 0deg));
}

/* Remove CSS hover effects for arrow, let JS handle it */
.board::after {
    transform: rotate(var(--arrow-rotation, 0deg));
}

/* Pulse animation for the collapse indicator */
@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.board h3 {
    font-size: 1.4rem;
    color: #fff;
    /* margin-bottom: 10px; */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.board hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #65a4b8, transparent);
    margin: 10px 0;
}

.board p,
.board li {
    color: #f0f0f0;
    font-size: 0.95rem;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.board ul {
    list-style: none;
}

.board ul li::before {
    content: "• ";
    color: #65a4b8;
    font-weight: bold;
    margin-right: 8px;
}

/* Links Column Layout */
.links-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 5px;
}

.links-column .btn {
    width: 100%;
    margin: 0;
}

/* Board specific styling for different sections */
.service-board {
    border-color: var(--service-board-border);
}

.resource-board {
    border-color: var(--resource-board-border);
}

.collection-board {
    border-color: var(--collection-board-border);
}

.spacedesk-board {
    border-color: var(--spacedesk-board-border);
}

.friends-board {
    border-color: var(--friends-board-border);
}

/* Payment Methods */
.payment-methods {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
    gap: 10px;
}

.qr-code {
    width: 30%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.qr-code.alipay {
    border-radius: 10px;
}

.qr-code.wechat {
    border-radius: 50%;
}

.aifadian-link {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 15px auto;
    width: 100%;
}

.sponsor-logo {
    width: 50%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.sponsor-logo:hover {
    transform: scale(1.05);
}

.contact {
    text-align: center;
    font-size: 0.9rem;
    color: #ccc;
    margin-top: 15px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .grid-layout {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .info-panels {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .info-panel {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .grid-layout {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .info-panels {
        grid-template-columns: 1fr;
    }
    
    .info-boards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .main-title h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        padding: 12px;
    }
    
    .payment-methods {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }
    
    .qr-code {
        width: 40%;
    }
    
    .background-video {
        display: none;
    }
    
    body {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
}