/* ================================================================== */
/* === GPT CHAT WIDGET STYLING (FLOATING INTERFACE) === */
/* ================================================================== */

/* GPT Toggle Button in Navbar */
.btn-gpt {
    background: linear-gradient(135deg, #DC143C, #A00000);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
    font-size: 14px;
    margin-left: 10px;
}

.btn-gpt:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.4);
    background: linear-gradient(135deg, #FF1744, #DC143C);
}

.btn-gpt:active {
    transform: translateY(0);
}

/* Floating Button */
.gpt-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #DC143C, #A00000);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(220, 20, 60, 0.5);
    z-index: 9998;
    transition: all 0.3s ease;
}

.gpt-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(220, 20, 60, 0.7);
}

.gpt-floating-btn.active {
    background: linear-gradient(135deg, #A00000, #DC143C);
}

.gpt-floating-btn img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

/* Notification badge on floating button */
.gpt-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF1744;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid #1a1a1a;
}

.gpt-notification-badge.show {
    display: flex;
}

/* Floating Chat Widget Container */
.gpt-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 420px;
    height: 650px;
    background: #1a1a1a;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    border: 1px solid #2a2a2a;
}

.gpt-chat-widget.show {
    display: flex;
    animation: slideInUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideInUp {
    from {
        transform: translateY(100%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Chat Header */
.gpt-chat-header {
    background: linear-gradient(135deg, #DC143C, #A00000);
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.gpt-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 16px;
}

.gpt-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gpt-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-weight: bold;
}

.gpt-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Chat Body - Message Area */
.gpt-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: linear-gradient(to bottom, #0f0f0f, #1a1a1a);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Custom Scrollbar */
.gpt-chat-body::-webkit-scrollbar {
    width: 6px;
}

.gpt-chat-body::-webkit-scrollbar-track {
    background: #0f0f0f;
}

.gpt-chat-body::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #DC143C, #A00000);
    border-radius: 3px;
}

.gpt-chat-body::-webkit-scrollbar-thumb:hover {
    background: #DC143C;
}

/* Individual Chat Messages */
.gpt-message {
    display: flex;
    gap: 12px;
    animation: messageSlideIn 0.3s ease;
    max-width: 100%;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gpt-message.user {
    flex-direction: row-reverse;
}

/* Message Avatar */
.gpt-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gpt-message.user .gpt-message-avatar {
    background: linear-gradient(135deg, #DC143C, #A00000);
}

.gpt-message.assistant .gpt-message-avatar {
    padding: 0;
    background: white;
    border: 2px solid #2a2a2a;
}

.gpt-message.assistant .gpt-message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Message Content Bubble */
.gpt-message-content {
    padding: 12px 16px;
    border-radius: 16px;
    max-width: 75%;
    color: #e0e0e0;
    line-height: 1.6;
    word-wrap: break-word;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gpt-message.user .gpt-message-content {
    background: linear-gradient(135deg, #DC143C, #A00000);
    color: white;
    border-radius: 16px 16px 4px 16px;
}

.gpt-message.assistant .gpt-message-content {
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 16px 16px 16px 4px;
}

/* Error and Warning Messages */
.gpt-message-error .gpt-message-content {
    background: rgba(220, 20, 60, 0.15) !important;
    border: 2px solid rgba(220, 20, 60, 0.5) !important;
    animation: shake 0.3s ease-in-out;
}

.gpt-message-warning .gpt-message-content {
    background: rgba(255, 193, 7, 0.15) !important;
    border: 2px solid rgba(255, 193, 7, 0.5) !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* System Messages */
.gpt-system-message {
    text-align: center;
    font-size: 12px;
    color: #888;
    padding: 6px 12px;
    margin: 4px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    opacity: 0.8;
}

/* Retry Button Container */
.gpt-retry-container {
    text-align: center;
    padding: 16px;
    margin: 8px 0;
}

.gpt-retry-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.gpt-retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.gpt-retry-btn:active {
    transform: translateY(0);
}

/* Text Formatting in Messages */
.gpt-message-content strong {
    color: #FF1744;
    font-weight: 700;
}

.gpt-message.user .gpt-message-content strong {
    color: white;
    font-weight: 700;
}

.gpt-message-content em {
    font-style: italic;
    color: #b0b0b0;
}

.gpt-message-content code {
    background: #1a1a1a;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #DC143C;
}

/* Message Images and Files */
.gpt-message-image {
    max-width: 200px;
    margin-top: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.gpt-message-image:hover {
    transform: scale(1.02);
}

.gpt-message-file {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.gpt-message-file-icon {
    font-size: 20px;
}

.gpt-message-file-info {
    flex: 1;
}

.gpt-message-file-name {
    font-size: 13px;
    font-weight: 600;
}

.gpt-message-file-size {
    font-size: 11px;
    color: #888;
}

/* Typing Indicator */
.gpt-typing {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
}

.gpt-typing span {
    width: 8px;
    height: 8px;
    background: #DC143C;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.gpt-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.gpt-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Chat Footer - Input Area */
.gpt-chat-footer {
    padding: 16px;
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
}

/* Voice Controls */
.gpt-voice-controls {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #333;
}

.gpt-voice-btn {
    background: #DC143C;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gpt-voice-btn:hover {
    background: #ff1744;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.5);
}

.gpt-voice-btn:active {
    transform: scale(0.95);
}

.gpt-voice-btn.recording {
    background: #ff1744;
    animation: gpt-pulse 1.5s infinite;
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.7);
}

@keyframes gpt-pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.05);
    }
}

/* Attached Files Display */
.gpt-attached-files {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
}

.gpt-attached-file {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(220, 20, 60, 0.2);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    border: 1px solid rgba(220, 20, 60, 0.3);
}

.gpt-attached-file-icon {
    font-size: 16px;
}

.gpt-attached-file-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.gpt-attached-file-remove {
    background: none;
    border: none;
    color: #DC143C;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    margin-left: 4px;
    line-height: 1;
    transition: transform 0.2s;
    font-weight: bold;
}

.gpt-attached-file-remove:hover {
    transform: scale(1.3);
}

/* Input Form */
.gpt-chat-footer form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.gpt-attachment-btn {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    padding: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.gpt-attachment-btn:hover {
    background: #333;
    border-color: #DC143C;
    transform: scale(1.05);
}

.gpt-chat-footer textarea {
    flex: 1;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    max-height: 120px;
    min-height: 44px;
    transition: all 0.2s;
}

.gpt-chat-footer textarea:focus {
    outline: none;
    border-color: #DC143C;
    background: #333;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.gpt-chat-footer textarea::placeholder {
    color: #666;
}

/* Send Button */
.gpt-send-btn {
    background: linear-gradient(135deg, #DC143C, #A00000);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.3);
}

.gpt-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.5);
    background: linear-gradient(135deg, #FF1744, #DC143C);
}

.gpt-send-btn:active {
    transform: scale(0.95);
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    background: #2a2a2a;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: translateX(400px);
    transition: transform 0.3s ease-in-out;
    max-width: 300px;
    font-size: 14px;
    pointer-events: all;
    border-left: 4px solid #888;
}

.notification.show {
    transform: translateX(0);
}

.notification-error {
    border-left-color: #DC143C;
    background: linear-gradient(to right, rgba(220, 20, 60, 0.2), #2a2a2a);
}

.notification-success {
    border-left-color: #4CAF50;
    background: linear-gradient(to right, rgba(76, 175, 80, 0.2), #2a2a2a);
}

.notification-warning {
    border-left-color: #FFC107;
    background: linear-gradient(to right, rgba(255, 193, 7, 0.2), #2a2a2a);
}

.notification-info {
    border-left-color: #2196F3;
    background: linear-gradient(to right, rgba(33, 150, 243, 0.2), #2a2a2a);
}

/* ================================================================== */
/* === DEDICATED GPT PAGE STYLING (technomak_gpt.html) === */
/* ================================================================== */

.gpt-app-container {
    display: flex;
    height: calc(100vh - 80px);
    overflow: hidden;
}

.gpt-sidebar {
    width: 280px;
    background-color: #1a1a1a;
    padding: 1rem;
    overflow-y: auto;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
}

.sidebar-section h3 {
    color: #DC143C;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 5px;
    border-bottom: 1px solid #333;
}

.sidebar-list a {
    display: block;
    padding: 8px 10px;
    color: #b0b0b0;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.sidebar-list a:hover,
.sidebar-list a.active {
    background-color: #333;
    color: white;
}

.gpt-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #0f0f0f;
}

.chat-window {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
}

.message {
    display: flex;
    margin-bottom: 1.5rem;
}

.message-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    flex-shrink: 0;
    margin-right: 15px;
}

.message.user .message-icon {
    background-color: #DC143C;
    color: white;
}

.message.assistant .message-icon {
    background-color: #444;
    color: #fff;
}

.message-content {
    background-color: #333;
    padding: 15px;
    border-radius: 10px;
    max-width: 80%;
    color: white;
}

.chat-input-area {
    padding: 1rem 2rem;
    border-top: 1px solid #333;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
}

.chat-input-area textarea {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #444;
    background-color: #333;
    color: white;
    border-radius: 8px;
    resize: none;
    font-size: 1rem;
    margin-right: 10px;
}

.chat-input-area .btn-primary {
    flex-shrink: 0;
    padding: 12px 20px;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .gpt-chat-widget {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 10px;
        right: 10px;
        left: 10px;
        margin: 0 auto;
    }
    
    .btn-gpt {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .notification-container {
        right: 10px;
        left: 10px;
    }
    
    .notification {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .gpt-chat-widget {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 0;
    }
    
    .gpt-chat-header {
        border-radius: 0;
    }
    
    .gpt-floating-btn {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
    }
}