/* --- Base Styles & Fonts --- */
:root {
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --card-shadow: rgba(0, 0, 0, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #e5e7eb;
    /* gray-200 */
    --accent-color: #db2777;
    /* pink-600 */
    --accent-hover: #be185d;
    /* pink-700 */
}

body {
    background-color: #030712;
    /* gray-950 */
    color: var(--text-primary);
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    overflow-x: hidden;
}

/* --- Aurora Background --- */
#aurora-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(139, 92, 246, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse at 80% 30%, rgba(219, 39, 119, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    animation: aurora 60s linear infinite;
    will-change: background-position;
}

@keyframes aurora {
    0% {
        background-position: 0% 50%, 50% 50%, 50% 50%;
    }

    25% {
        background-position: 20% 0%, 80% 20%, 30% 70%;
    }

    50% {
        background-position: 80% 100%, 20% 80%, 80% 30%;
    }

    75% {
        background-position: 30% 70%, 0% 30%, 20% 0%;
    }

    100% {
        background-position: 0% 50%, 50% 50%, 50% 50%;
    }
}

/* --- Main Layout --- */
.main-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1024px;
    /* lg:max-w-4xl */
    margin: 0 auto;
    padding: 3rem 1rem;
}

/* --- CTA Buttons --- */
.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(219, 39, 119, 0.3);
    margin: 0 10px;
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(219, 39, 119, 0.4);
}

.cta-button.secondary:hover {
    background: rgba(219, 39, 119, 0.1);
    box-shadow: 0 4px 15px rgba(219, 39, 119, 0.2);
}

.game-launch-btn {
    background: linear-gradient(90deg, #db2777, #8b5cf6, #3b82f6);
    background-size: 200% 200%;
    animation: gradientMove 3s ease infinite;
    font-size: 1.5rem;
    padding: 1.5rem 4rem;
    border-radius: 100px;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.game-launch-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.8);
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* --- Card Component --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    /* rounded-3xl */
    padding: 2rem;
    box-shadow: 0 8px 32px 0 var(--card-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    /* For fade-in animation */
    backface-visibility: hidden;
    transform: translateZ(0);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.15);
}

.card-header {
    font-size: 1.5rem;
    /* text-2xl */
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* --- Profile Section --- */
#profile-avatar {
    border: 4px solid var(--card-border);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

#profile-name {
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

#profile-bio {
    color: var(--text-secondary);
}

/* --- YouTube Section --- */
#youtube-container iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 1rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* --- Links & Tools List --- */
#links-list a,
#tools-list a {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 0.75rem;
    /* rounded-xl */
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

#links-list a:hover,
#tools-list a:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#links-list a .icon,
#tools-list a .icon {
    margin-right: 1rem;
    transition: transform 0.3s ease;
}

#links-list a:hover .icon,
#tools-list a:hover .icon {
    transform: rotate(-5deg) scale(1.1);
}

/* --- Chatbot --- */
#neon-image {
    filter: drop-shadow(0 0 20px var(--accent-color));
    transition: transform 0.5s ease-in-out;
}

#neon-image:hover {
    transform: scale(1.1);
}

#chat-log {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    scroll-behavior: smooth;
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
    animation: chat-fade-in 0.5s ease-out;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.bot {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 85%;
    padding: 0.75rem 1.25rem;
    border-radius: 1.25rem;
    line-height: 1.5;
}

.chat-message.user .chat-bubble {
    background: var(--accent-color);
    color: white;
    border-top-right-radius: 0.25rem;
}

.chat-message.bot .chat-bubble {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-top-left-radius: 0.25rem;
}

#user-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

#user-input::placeholder {
    color: #9ca3af;
}

/* gray-400 */
#user-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(219, 39, 119, 0.5);
}

#send-button {
    background: var(--accent-color);
    border-radius: 0.5rem;
    color: white;
    transition: all 0.3s ease;
}

#send-button:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

/* --- Animations --- */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes chat-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards;
}

/* Typing indicator from previous CSS */
.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 2px;
    animation: bounce 1.4s infinite both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

/* --- YouTube Studio Kit Tool --- */
.tab-button {
    background-color: transparent;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
}

.tab-button.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-color);
}

.preview-container {
    background: #181818;
    /* YouTube dark theme background */
}

.preview-title {
    color: #f1f1f1;
}

.preview-meta {
    color: #aaa;
}

#timestamp-list .delete-ts-btn {
    opacity: 0.5;
}

#timestamp-list>div:hover .delete-ts-btn {
    opacity: 1;
}

#previews-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* --- Chatbot Suggestions --- */
.suggestion-chip {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-chip:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}