/* Basic Style Settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Audiowide', cursive;
    background: #000;
    color: #fff;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Navigation Bar Style */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #8A2BE2;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 2rem;
}

.nav-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.nav-title {
    font-family: 'Audiowide', cursive;
    color: #8A2BE2;
    font-size: 1.2rem;
    text-shadow: 0 0 10px #8A2BE2;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px #8A2BE2;
}

.nav-link:hover {
    color: #00ffff;
    text-shadow: 0 0 15px #00ffff;
    transform: scale(1.1);
}

.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    padding: 20px;
}

.grid-item {
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: fadeInOut 8s var(--delay) infinite;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    filter: brightness(0.6) saturate(1.2);
    transition: all 0.3s ease;
}

.grid-item:hover img {
    filter: brightness(0.8) saturate(1.5);
    transform: scale(1.05);
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: scale(0.95); }
    10% { opacity: 0.7; transform: scale(1); }
    40% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 0; transform: scale(0.95); }
}

/* Home Container Style */
.home-container {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding: 2rem;
    width: 100%;
    z-index: 10;
    animation: fadeIn 1.5s ease-in-out;
    margin: 80px auto 0;
    position: relative;
    max-width: 1200px;
}

/* Hero Section Style */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem 3rem;
    position: relative;
}

.nft-main-title {
    font-family: 'Audiowide', cursive;
    font-size: 2.5rem;
    color: #8A2BE2;
    margin: 1rem 0;
    text-shadow: 0 0 15px #8A2BE2;
    animation: neonGlow 3s infinite;
}

.nft-main-description {
    font-size: 1.2rem;
    color: #00ffff;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    text-shadow: 0 0 10px #00ffff;
}

/* Retain Original Container Style for Compatibility */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    max-width: 800px;
    width: 100%;
    z-index: 10;
    animation: fadeIn 1.5s ease-in-out;
    margin: 80px auto 0;
    position: relative;
}

/* Neon Light Effect */
@keyframes neonGlow {
    0% {
        text-shadow: 0 0 10px #8A2BE2, 0 0 20px #8A2BE2, 0 0 30px #8A2BE2;
        box-shadow: 0 0 10px #8A2BE2, 0 0 20px #8A2BE2, 0 0 30px #8A2BE2;
    }
    50% {
        text-shadow: 0 0 20px #00ffff, 0 0 30px #00ffff, 0 0 40px #00ffff;
        box-shadow: 0 0 20px #00ffff, 0 0 30px #00ffff, 0 0 40px #00ffff;
    }
    100% {
        text-shadow: 0 0 10px #8A2BE2, 0 0 20px #8A2BE2, 0 0 30px #8A2BE2;
        box-shadow: 0 0 10px #8A2BE2, 0 0 20px #8A2BE2, 0 0 30px #8A2BE2;
    }
}

/* Logo Style and Rotation Animation */
.logo-container {
    margin-bottom: 1.5rem;
}

.logo {
    width: 180px;
    height: 180px;
    filter: drop-shadow(0 0 15px rgba(138, 43, 226, 0.8));
    transition: transform 0.3s ease;
    border-radius: 50%;
    overflow: hidden;
}

.nav-logo {
    border-radius: 50%;
    overflow: hidden;
}

@keyframes rotateLogo {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#rotating-logo {
    animation: rotateLogo 20s linear infinite;
}

#rotating-logo:hover {
    animation-duration: 5s;
    filter: drop-shadow(0 0 25px rgba(0, 255, 255, 0.8));
}

/* CA Input Box and Copy Button */
.ca-container {
    width: 100%;
    max-width: 500px;
    position: relative;
    margin-bottom: 1rem;
}

.ca-box {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50px;
    padding: 0.5rem;
    border: 2px solid #8A2BE2;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.5);
    animation: neonGlow 3s infinite;
}

#ca-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Permanent Marker', cursive;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    outline: none;
    letter-spacing: 1px;
}

.glow-button {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glow-button:hover {
    transform: scale(1.1);
    animation: neonGlow 1s infinite;
}

.icon-img {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.8));
}

.copy-message {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #00ffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 0 10px #00ffff;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.social-link {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #8A2BE2;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: scale(1.2) rotate(10deg);
    border-color: #00ffff;
}

/* Community Section Style */
.community-section {
    text-align: center;
    padding: 2rem 1rem 4rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    margin-bottom: 3rem;
}

.community-description {
    color: #00ffff;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 0 8px #00ffff;
}

/* Featured NFT Section Style */
.ai-chat-section {
    padding: 2rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    border: 2px solid #8A2BE2;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
    margin: 2rem 0;
}

.section-title {
    font-family: 'Audiowide', cursive;
    font-size: 2rem;
    color: #8A2BE2;
    margin-bottom: 2rem;
    text-shadow: 0 0 15px #8A2BE2;
    text-align: center;
}

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

#clear-chat-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid #8A2BE2;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

#clear-chat-button:hover {
    background-color: rgba(138, 43, 226, 0.3);
    box-shadow: 0 0 10px #8A2BE2;
}

#clear-chat-button .icon-img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

.chat-output {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffff;
    border-radius: 15px;
    padding: 1.5rem;
    min-height: 150px;
    max-height: 60vh;
    overflow-y: auto;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    transition: all 0.3s ease;
    padding-top: 2rem; /* 为清除按钮留出空间 */
}

.chat-output::-webkit-scrollbar {
    width: 8px;
}

.chat-output::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.chat-output::-webkit-scrollbar-thumb {
    background: #00ffff;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.ai-message {
    background-color: rgba(0, 0, 0, 0.7);
    border-left: 3px solid #8A2BE2;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    border-radius: 0 8px 8px 0;
    animation: fadeIn 0.3s ease-in-out;
    word-wrap: break-word;
    max-width: 80%;
    align-self: flex-start;
    line-height: 1.5;
}

.ai-message p {
    margin-bottom: 0.8rem;
}

.ai-message p:last-child {
    margin-bottom: 0;
}

.ai-message ul, .ai-message ol {
    margin-left: 1.5rem;
    margin-bottom: 0.8rem;
}

.ai-message code {
    font-family: monospace;
    background-color: rgba(30, 30, 30, 0.7);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.ai-message pre {
    background-color: rgba(30, 30, 30, 0.7);
    padding: 0.8rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 0.8rem;
}

.ai-message pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    display: block;
}

.user-message {
    color: #00ffff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px #00ffff;
    text-align: right;
    animation: messageAppear 0.3s ease-in-out;
}

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

.chat-input-container {
    display: flex;
    gap: 1rem;
}

.chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ff00de;
    border-radius: 25px;
    padding: 1rem 1.5rem;
    color: #fff;
    font-family: 'Audiowide', cursive;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(255, 0, 222, 0.5);
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#send-button {
    background: linear-gradient(45deg, #ff00de, #00ffff);
    color: #fff;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 25px;
    font-family: 'Audiowide', cursive;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

#send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 222, 0.8);
}

/* NFT Page Style */
.nft-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    margin-top: 80px;
}

.coming-soon-banner {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: rgba(255, 0, 222, 0.8);
    color: #fff;
    text-align: center;
    padding: 10px 0;
    z-index: 100;
    animation: neonGlow 2s infinite;
}

.coming-soon-text {
    font-family: 'Audiowide', cursive;
    font-size: 1.5rem;
    letter-spacing: 3px;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
}

.nft-title {
    font-family: 'Audiowide', cursive;
    color: #ff00de;
    font-size: 2.5rem;
    text-align: center;
    margin-top: 60px;
    text-shadow: 0 0 15px #ff00de;
}

.nft-description {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.nft-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.nft-card {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #8A2BE2;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-in-out;
    box-shadow: 0 0 15px rgba(255, 0, 222, 0.3);
    width: 100%;
    display: flex;
    flex-direction: column;
}

.nft-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
    border-color: #00ffff;
}

.nft-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.nft-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff00de;
    color: white;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 0, 222, 0.7);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.nft-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.nft-card:hover .nft-image {
    transform: scale(1.1);
}

.nft-info {
    padding: 1.5rem;
    text-align: center;
}

.nft-name {
    font-family: 'Audiowide', cursive;
    color: #ff00de;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    text-shadow: 0 0 10px #ff00de;
}

.nft-price {
    color: #00ffff;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px #00ffff;
}

.nft-buy-btn {
    background: linear-gradient(45deg, #ff00de, #00ffff);
    border: none;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-family: 'Audiowide', cursive;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    margin-top: 0.5rem;
}

.nft-buy-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

.active {
    color: #00ffff;
    text-shadow: 0 0 15px #00ffff;
}

/* Page Entry Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        width: 150px;
        height: 150px;
    }
    
    .ca-box {
        padding: 0.3rem;
    }
    
    #ca-input {
        font-size: 1rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .icon-img {
        width: 20px;
        height: 20px;
    }
    
    .nft-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nft-main-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container, .home-container {
        padding: 1rem;
    }
    
    .logo {
        width: 120px;
        height: 120px;
    }
    
    #ca-input {
        font-size: 0.9rem;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .nft-preview-grid {
        grid-template-columns: 1fr;
    }
    
    .nft-main-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
}