/* Giovanni's Jibber Jabber - TDC São Paulo Theme */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 25%, #FFD23F 50%, #06D6A0 75%, #118AB2 100%);
    min-height: 100vh;
    color: #1A1A1A;
    overflow-x: hidden;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* Header Styles */
.game-header {
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    border: 3px solid #FF6B35;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
}

.game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF6B35, #F7931E, #FFD23F, #06D6A0, #118AB2);
}

.game-logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.giovanni-link {
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.giovanni-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #F7931E;
    box-shadow: 0 8px 20px rgba(247, 147, 30, 0.4);
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    cursor: pointer;
}

.giovanni-link:hover .giovanni-logo {
    transform: scale(1.1) rotate(5deg);
    border-color: #FFD23F;
    box-shadow: 0 12px 25px rgba(255, 210, 63, 0.5);
    filter: brightness(1.1);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.game-title {
    font-size: 2.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #FF6B35, #F7931E, #FFD23F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin: 0;
}

.game-subtitle {
    font-size: 1.3rem;
    color: #FFFFFF;
    margin-bottom: 20px;
    font-weight: 300;
}

.progress-bar {
    background: #2D2D2D;
    border: 2px solid #FF6B35;
    border-radius: 25px;
    height: 35px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #118AB2, #74B9FF, #FFD23F);
    height: 100%;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 23px;
    box-shadow: 0 0 15px rgba(17, 138, 178, 0.5);
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

/* Conference Room */
.conference-room {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #F7931E;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 15px 35px rgba(247, 147, 30, 0.2);
    backdrop-filter: blur(10px);
}

.room-title-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.conference-link {
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.conference-link:hover {
    transform: scale(1.05);
}

.conference-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(247, 147, 30, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.conference-link:hover .conference-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(255, 210, 63, 0.4);
    filter: brightness(1.1);
}

.room-title {
    text-align: center;
    margin: 0;
    color: #1A1A1A;
    font-size: 1.8rem;
    font-weight: 600;
    background: linear-gradient(45deg, #F7931E, #FFD23F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.npcs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
}

/* NPC Cards */
.npc-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
    border: 3px solid #118AB2;
    border-radius: 15px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 20px rgba(17, 138, 178, 0.15);
    position: relative;
    overflow: hidden;
}

.npc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF6B35, #F7931E, #FFD23F, #06D6A0, #118AB2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.npc-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(17, 138, 178, 0.25);
    border-color: #74B9FF;
}

.npc-card:hover::before {
    opacity: 1;
}

.npc-card.safe {
    border-color: #118AB2;
    background: linear-gradient(135deg, #E3F2FD 0%, #FFFFFF 100%);
    box-shadow: 0 8px 20px rgba(17, 138, 178, 0.2);
}

.npc-card.needs-convincing {
    border-color: #FF6B35;
    background: linear-gradient(135deg, #FFF4F1 0%, #FFFFFF 100%);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.2);
}

.npc-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    margin: 0 auto 12px;
    border: 3px solid #F7931E;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(247, 147, 30, 0.3);
    transition: all 0.3s ease;
}

.npc-card:hover .npc-avatar {
    border-color: #FFD23F;
    box-shadow: 0 6px 18px rgba(255, 210, 63, 0.4);
    transform: scale(1.1);
}

.npc-name {
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 6px;
    color: #1A1A1A;
    background: linear-gradient(45deg, #118AB2, #74B9FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.npc-role {
    font-size: 0.95rem;
    color: #F7931E;
    margin-bottom: 10px;
    font-weight: 500;
}

.npc-bio {
    font-size: 0.85rem;
    color: #666666;
    line-height: 1.4;
}

.status-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-indicator.safe {
    background: linear-gradient(135deg, #118AB2, #74B9FF);
    color: white;
    box-shadow: 0 3px 8px rgba(17, 138, 178, 0.4);
}

.status-indicator.danger {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: white;
    box-shadow: 0 3px 8px rgba(255, 107, 53, 0.4);
}

.status-indicator.needs-convincing {
    background: linear-gradient(135deg, #F7931E, #FFD23F);
    color: white;
    box-shadow: 0 3px 8px rgba(247, 147, 30, 0.4);
}

/* Chat Interface */
.chat-interface {
    background: rgba(255, 255, 255, 0.98);
    border: 3px solid #118AB2;
    border-radius: 20px;
    height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(17, 138, 178, 0.2);
    backdrop-filter: blur(10px);
}

.chat-header {
    background: linear-gradient(135deg, #118AB2 0%, #74B9FF 100%);
    color: white;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 17px 17px 0 0;
    box-shadow: 0 2px 10px rgba(17, 138, 178, 0.3);
}

.back-btn {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(255, 107, 53, 0.3);
}

.back-btn:hover {
    background: linear-gradient(135deg, #F7931E, #FFD23F);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(247, 147, 30, 0.4);
}

.current-npc-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-npc-info .npc-name {
    color: #FFFFFF;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    background: none;
    -webkit-text-fill-color: #FFFFFF;
}

.current-npc-info .npc-role {
    color: #FFD23F;
    font-weight: 500;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.current-npc-info .npc-avatar {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
    border-color: #FFD23F;
}

.chat-messages {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
}

.message {
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.message.user {
    background: linear-gradient(135deg, #118AB2, #74B9FF);
    color: white;
    margin-left: auto;
    text-align: right;
    border-bottom-right-radius: 5px;
}

.message.npc {
    background: white;
    border: 2px solid #F7931E;
    margin-right: auto;
    color: #1A1A1A;
    border-bottom-left-radius: 5px;
}

.message.system {
    background: linear-gradient(135deg, #FFD23F, #F7931E);
    color: #1A1A1A;
    text-align: center;
    margin: 15px auto;
    max-width: 90%;
    font-style: italic;
    font-weight: 500;
    border-radius: 20px;
}

/* Chat Actions */
.chat-actions {
    padding: 20px;
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
    border-top: 3px solid #F7931E;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.action-btn {
    background: linear-gradient(135deg, #118AB2, #74B9FF);
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(17, 138, 178, 0.3);
}

.action-btn:hover {
    background: linear-gradient(135deg, #74B9FF, #118AB2);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(116, 185, 255, 0.4);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #666666, #888888);
    box-shadow: 0 4px 10px rgba(102, 102, 102, 0.3);
}

.action-btn.secondary:hover {
    background: linear-gradient(135deg, #888888, #666666);
    box-shadow: 0 6px 15px rgba(136, 136, 136, 0.4);
}

.action-btn.special {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    animation: pulse 2s infinite;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.action-btn.special:hover {
    background: linear-gradient(135deg, #F7931E, #FFD23F);
    box-shadow: 0 6px 20px rgba(247, 147, 30, 0.5);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Custom Message Input */
.custom-message-input {
    padding: 20px;
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
    border-top: 3px solid #F7931E;
    display: flex;
    gap: 12px;
}

.custom-message-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #118AB2;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.custom-message-input input:focus {
    outline: none;
    border-color: #74B9FF;
    box-shadow: 0 0 10px rgba(116, 185, 255, 0.2);
}

.custom-message-input button {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 107, 53, 0.3);
}

.custom-message-input button:hover {
    background: linear-gradient(135deg, #F7931E, #FFD23F);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(247, 147, 30, 0.4);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 450px;
    border: 4px solid #118AB2;
    box-shadow: 0 20px 40px rgba(17, 138, 178, 0.3);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #FF6B35, #F7931E, #FFD23F, #06D6A0, #118AB2);
}

.modal-content h2 {
    background: linear-gradient(45deg, #118AB2, #74B9FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-size: 2.2rem;
    font-weight: 700;
}

.modal-content p {
    margin-bottom: 18px;
    color: #1A1A1A;
    line-height: 1.6;
    font-size: 1.1rem;
}

.play-again-btn {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(255, 107, 53, 0.4);
}

.play-again-btn:hover {
    background: linear-gradient(135deg, #F7931E, #FFD23F);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(247, 147, 30, 0.5);
}

/* Loading Spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #bdc3c7;
    border-left: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: white;
    margin-top: 15px;
    font-size: 1.1rem;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #F8F9FA, #FFFFFF);
    border: 2px solid #F7931E;
    border-radius: 15px;
    margin-bottom: 18px;
    max-width: 80%;
    margin-right: auto;
    box-shadow: 0 3px 8px rgba(247, 147, 30, 0.2);
}

.typing-indicator span {
    color: #666666;
    font-style: italic;
    font-size: 0.9rem;
}

.typing-dots {
    display: flex;
    gap: 5px;
}

.typing-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F7931E, #FFD23F);
    animation: typing 1.4s infinite ease-in-out;
    box-shadow: 0 2px 4px rgba(247, 147, 30, 0.3);
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 5px;
    }
    
    .game-logo-section {
        gap: 15px;
    }
    
    .giovanni-logo {
        width: 60px;
        height: 60px;
    }
    
    .game-title {
        font-size: 1.8rem;
    }
    
    .game-subtitle {
        font-size: 1rem;
    }
    
    .room-title-section {
        gap: 12px;
    }
    
    .conference-icon {
        width: 40px;
        height: 40px;
    }
    
    .room-title {
        font-size: 1.5rem;
    }
    
    .npcs-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .npc-card {
        padding: 10px;
    }
    
    .npc-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .chat-interface {
        height: 500px;
    }
    
    .chat-header {
        padding: 10px;
        flex-wrap: wrap;
    }
    
    .chat-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .game-logo-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .giovanni-logo {
        width: 50px;
        height: 50px;
    }
    
    .game-title {
        font-size: 1.5rem;
    }
    
    .room-title-section {
        gap: 8px;
    }
    
    .conference-icon {
        width: 32px;
        height: 32px;
    }
    
    .room-title {
        font-size: 1.2rem;
    }
    
    .npcs-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .game-header {
        padding: 15px;
    }
    
    .conference-room {
        padding: 15px;
    }
}

/* Creator Credit */
.creator-credit {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 100;
}

.creator-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(26, 26, 26, 0.8);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(247, 147, 30, 0.3);
}

.creator-link:hover {
    background: rgba(247, 147, 30, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 147, 30, 0.4);
}

.creator-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #F7931E;
}

.creator-text {
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.creator-link:hover .creator-text {
    color: #1A1A1A;
}

@media (max-width: 768px) {
    .creator-credit {
        bottom: 10px;
        right: 10px;
    }
    
    .creator-link {
        padding: 6px 10px;
    }
    
    .creator-avatar {
        width: 20px;
        height: 20px;
    }
    
    .creator-text {
        font-size: 0.7rem;
    }
}
