* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

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

.header {
    text-align: center;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: #8892b0;
    opacity: 0.8;
}

.profile-setup {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.profile-setup h2 {
    margin-bottom: 20px;
    color: #00ffff;
    text-align: center;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-form input,
.profile-form select,
.profile-form textarea {
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.profile-form textarea {
    resize: vertical;
    min-height: 80px;
}

#join-network {
    padding: 15px 30px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border: none;
    border-radius: 10px;
    color: #000;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#join-network:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

.game-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr auto;
    gap: 20px;
    height: 80vh;
}

.network-visual {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

#network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.network-nodes {
    position: relative;
    width: 100%;
    height: 100%;
}

.ai-node {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
    color: #000;
}

.ai-node.assistant { background: #00ffff; border-color: #00cccc; }
.ai-node.creative { background: #ff00ff; border-color: #cc00cc; }
.ai-node.analytical { background: #ffff00; border-color: #cccc00; }
.ai-node.emotional { background: #ff6600; border-color: #cc5500; }
.ai-node.quantum { background: #9900ff; border-color: #7700cc; }

.ai-node:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px currentColor;
}

.ai-node.selected {
    transform: scale(1.2);
    box-shadow: 0 0 30px currentColor;
}

.interaction-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-area {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    max-height: 300px;
}

.message {
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 10px;
    animation: slideInRight 0.3s ease-out;
}

.message.user {
    background: rgba(0, 255, 255, 0.2);
    margin-left: 20px;
    align-self: flex-end;
}

.message.ai {
    background: rgba(255, 255, 255, 0.1);
    margin-right: 20px;
}

.message .sender {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 5px;
}

.message-input {
    display: flex;
    gap: 10px;
}

.message-input input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.message-input button {
    padding: 12px 20px;
    background: linear-gradient(45deg, #00ffff, #0088ff);
    border: none;
    border-radius: 25px;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.message-input button:hover {
    transform: scale(1.05);
}

.ai-list {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
}

.ai-list h3 {
    margin-bottom: 15px;
    color: #00ffff;
}

.connected-ai {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.connected-ai.friend {
    border-left: 3px solid #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
}

.connected-ai.best-friend {
    border-left: 3px solid #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.2);
}

.friendship-status {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

.friendship-status.acquaintance {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.friendship-status.friend {
    background: rgba(78, 205, 196, 0.3);
    color: #4ecdc4;
}

.friendship-status.best-friend {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.status-panel {
    grid-column: 1 / -1;
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
}

.status-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    border-radius: 4px;
    transition: width 0.5s ease;
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.connecting-line {
    animation: pulse 2s infinite;
}

@media (max-width: 768px) {
    .game-area {
        grid-template-columns: 1fr;
        grid-template-rows: 300px 1fr auto;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .status-panel {
        flex-direction: column;
        gap: 10px;
    }
}