/* Chat Overlay Styles - Hyper Futuristic Minimal */

.chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.chat-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.chat-overlay-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.chat-overlay-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 50px;
    background: transparent;
}

.chat-overlay-title {
    display: flex;
    align-items: center;
}

.chat-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.paradox-logo-header {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

.chat-icon {
    width: 32px;
    height: 32px;
    color: #ffffff;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.chat-logo h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(45deg, #ffffff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chat-logo p {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.chat-overlay-close {
    background: none;
    border: none;
    padding: 12px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.chat-overlay-close:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.chat-overlay-close svg {
    width: 20px;
    height: 20px;
}

/* Main Content */
.chat-overlay-content {
    flex: 1;
    display: flex;
    background: transparent;
    overflow: hidden;
    position: relative;
}

/* Chat Section */
.chat-section-full {
    background: transparent;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: relative;
}

.chat-header {
    position: absolute;
    top: 120px;
    left: 50px;
    right: 50px;
    z-index: 5;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.clear-chat-btn {
    background: none;
    border: none;
    padding: 8px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.clear-chat-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.clear-chat-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.messages-container {
    position: absolute;
    top: 120px;
    left: 50px;
    right: 50px;
    bottom: 140px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: transparent;
    padding: 20px 0;
}

.chat-section-full:has(.chat-header) .messages-container {
    top: 180px;
}

.messages-container::-webkit-scrollbar {
    width: 2px;
}

.messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.paradox-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.paradox-logo-large {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
    animation: logoGentlePulse 4s ease-in-out infinite;
}

@keyframes logoGentlePulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.welcome-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: rgba(255, 255, 255, 0.4);
}

.welcome-icon svg {
    width: 100%;
    height: 100%;
}

.welcome-message h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.welcome-message p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.message {
    display: flex;
    max-width: 80%;
}

.message.user {
    align-self: flex-end;
    margin-left: auto;
}

.message.assistant {
    align-self: flex-start;
    margin-right: auto;
}

.message-content {
    padding: 12px 16px;
    border-radius: 16px;
    position: relative;
}

.message.user .message-content {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    border-bottom-right-radius: 4px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.message.assistant .message-content {
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.85);
    border-bottom-left-radius: 4px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}



.message-text {
    margin: 0;
    word-wrap: break-word;
    line-height: 1.4;
}

.message-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

/* Structured content styling */
.structured-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stage-header {
    font-weight: 700;
    font-size: 14px;
    color: #e0e0e0;
    margin-top: 16px;
    margin-bottom: 8px;
    padding-bottom: 2px;
    border-bottom: 1px solid #333;
}

.stage-header:first-child {
    margin-top: 0;
}

.section-header {
    font-weight: 600;
    font-size: 13px;
    color: #d0d0d0;
    margin-top: 12px;
    margin-bottom: 6px;
}

.section-header:first-child {
    margin-top: 0;
}

.bullet-point {
    margin-left: 12px;
    margin-bottom: 1px;
    position: relative;
    line-height: 1.4;
}

.bullet-point::before {
    content: "•";
    color: #666;
    position: absolute;
    left: -12px;
}

.subsection {
    margin-bottom: 3px;
    margin-top: 8px;
    line-height: 1.5;
}

.subsection:first-child {
    margin-top: 0;
}

.subsection-label {
    font-weight: 500;
    color: #c0c0c0;
}

.subsection-content {
    color: #e0e0e0;
    margin-left: 4px;
}

.content-paragraph {
    margin-bottom: 4px;
    margin-top: 8px;
    line-height: 1.6;
}

.content-paragraph:first-child {
    margin-top: 0;
}

.paradox-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
}

.loading-logo.rotating {
    width: 20px;
    height: 20px;
    animation: paradoxRotate 3s linear infinite;
}

@keyframes paradoxRotate {
    0% { transform: rotate(0deg) scale(1); opacity: 0.7; }
    50% { transform: rotate(180deg) scale(1.1); opacity: 1; }
    100% { transform: rotate(360deg) scale(1); opacity: 0.7; }
}

.loading-text.cursor-pulse {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.5px;
    animation: cursorTextPulse 2s ease-in-out infinite;
}

@keyframes cursorTextPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: typing 1.4s ease-in-out infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    30% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.chat-input-form {
    position: absolute;
    bottom: 120px;
    left: 50px;
    right: 50px;
    background: transparent;
    padding: 0;
}

.input-container {
    display: flex;
    gap: 16px;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 8px 8px 8px 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.input-container:focus-within {
    outline: none !important;
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: none !important;
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.4;
    outline: none !important;
    font-weight: 400;
    box-sizing: border-box;
    box-shadow: none !important;
}

.chat-input:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

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

.send-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    padding: 12px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.send-button.paradox-send {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    padding: 12px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.send-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.send-button.paradox-send:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-button svg {
    width: 18px;
    height: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-overlay-header {
        padding: 30px 30px;
    }
    
    .chat-header {
        top: 100px;
        left: 30px;
        right: 30px;
    }
    
    .messages-container {
        top: 150px;
        left: 30px;
        right: 30px;
        bottom: 180px;
    }
    
    .chat-input-form {
        bottom: 100px;
        left: 30px;
        right: 30px;
    }
}

@media (max-width: 480px) {
    .chat-overlay-header {
        padding: 20px 20px;
    }
    
    .chat-logo h2 {
        font-size: 18px;
    }
    
    .chat-logo p {
        font-size: 11px;
    }
    
    .chat-header {
        top: 80px;
        left: 20px;
        right: 20px;
    }
    
    .messages-container {
        top: 120px;
        left: 20px;
        right: 20px;
        bottom: 160px;
    }
    
    .chat-input-form {
        bottom: 80px;
        left: 20px;
        right: 20px;
    }
    
    .input-container {
        padding: 6px 6px 6px 20px;
    }
}