/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global Scrollbar Styling */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(228, 26, 28, 0.5) rgba(0, 0, 0, 0.3);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(228, 26, 28, 0.5);
    border-radius: 5px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(228, 26, 28, 0.7);
}

*::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.3);
}

html {
    overflow-y: auto;
    overflow-x: hidden;
}

body {
    font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', 'Consolas', 'Monaco', 'Menlo', 'Courier New', monospace;
    background: #000000;
    background-image: 
        radial-gradient(at 0% 0%, rgba(228, 26, 28, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(228, 26, 28, 0.03) 0px, transparent 50%);
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    letter-spacing: 0.3px;
    font-weight: 400;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 3rem;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(228, 26, 28, 0.2);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    min-height: 50px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.header-left {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    width: 200px;
}

.logo-link {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s, filter 0.2s;
}

.logo-link:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(228, 26, 28, 0.6));
}

.logo-img {
    height: 28px;
    width: auto;
    display: block;
    transition: filter 0.2s;
}

.logo {
    font-family: 'Exo 2', 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #e0e0e0;
    margin: 0;
    white-space: nowrap;
    transition: color 0.2s;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.nav-link {
    font-family: 'Exo 2', 'Rajdhani', sans-serif;
    color: #999;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s;
    padding: 0.4rem 0.6rem;
    white-space: nowrap;
    border-radius: 4px;
    position: relative;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.nav-link:hover {
    color: #e41a1c;
    text-shadow: 0 0 8px rgba(228, 26, 28, 0.5);
}

.header-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex: 0 0 auto;
    width: 200px;
    justify-content: flex-end;
}

.upgrade-btn, .login-btn, .register-btn, .logout-btn, .back-btn {
    font-family: 'Exo 2', 'Rajdhani', sans-serif;
    padding: 0.35rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.upgrade-btn {
    background: rgba(228, 26, 28, 0.2);
    color: #e41a1c;
    border: 1px solid rgba(228, 26, 28, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.upgrade-btn:hover {
    background: rgba(228, 26, 28, 0.3);
    border-color: rgba(228, 26, 28, 0.6);
    box-shadow: 0 0 12px rgba(228, 26, 28, 0.3);
}

.login-btn, .register-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-btn:hover, .register-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(228, 26, 28, 0.4);
    color: #e41a1c;
}

.register-btn {
    background: rgba(228, 26, 28, 0.15);
    border-color: rgba(228, 26, 28, 0.3);
    color: #e41a1c;
}

.register-btn:hover {
    background: rgba(228, 26, 28, 0.25);
    border-color: rgba(228, 26, 28, 0.5);
    box-shadow: 0 0 10px rgba(228, 26, 28, 0.2);
}

.logout-btn, .back-btn {
    background: rgba(255, 255, 255, 0.03);
    color: #999;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.logout-btn:hover, .back-btn:hover {
    color: #e41a1c;
    border-color: rgba(228, 26, 28, 0.3);
    background: rgba(228, 26, 28, 0.1);
}

/* Chat Container */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: transparent;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chat-messages::-webkit-scrollbar {
    width: 10px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(228, 26, 28, 0.5);
    border-radius: 5px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(228, 26, 28, 0.7);
}

.welcome-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.welcome-message h2 {
    font-family: 'Exo 2', 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #e0e0e0;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.message {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
}

.message.user {
    background: rgba(228, 26, 28, 0.08);
    border: 1px solid rgba(228, 26, 28, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: row-reverse;
}

.message.assistant {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.message-content {
    flex: 1;
    line-height: 1.7;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: rgba(228, 26, 28, 0.2);
    color: #e41a1c;
    border: 1px solid rgba(228, 26, 28, 0.3);
    box-shadow: 0 0 8px rgba(228, 26, 28, 0.2);
}

.message.assistant .message-avatar {
    background: rgba(255, 255, 255, 0.05);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2px;
    overflow: hidden;
}

.message.assistant .message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.message.status-message {
    opacity: 0.8;
}

.message.status-message .message-content {
    animation: pulse 2s infinite;
}

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

.file-message .message-content a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(228, 26, 28, 0.1);
    border: 1px solid rgba(228, 26, 28, 0.3);
    border-radius: 6px;
    transition: all 0.3s;
}

.file-message .message-content a:hover {
    background: rgba(228, 26, 28, 0.2);
    border-color: rgba(228, 26, 28, 0.5);
}

/* Chat Input */
.chat-input-container {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(228, 26, 28, 0.15);
}

.chat-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid rgba(228, 26, 28, 0.2);
    border-radius: 12px;
    padding: 0.75rem;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.chat-form:focus-within {
    border-color: rgba(228, 26, 28, 0.4);
    box-shadow: 0 4px 25px rgba(228, 26, 28, 0.15);
}

.message-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #e0e0e0;
    font-size: 1rem;
    resize: none;
    max-height: 200px;
    overflow-y: auto;
    font-family: inherit;
    padding: 0.5rem;
    outline: none;
}

.message-input::placeholder {
    color: #666;
}

.send-btn {
    background: rgba(228, 26, 28, 0.2);
    border: 1px solid rgba(228, 26, 28, 0.3);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e41a1c;
    transition: all 0.3s;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.send-btn:hover:not(:disabled) {
    background: rgba(228, 26, 28, 0.3);
    border-color: rgba(228, 26, 28, 0.5);
    box-shadow: 0 0 12px rgba(228, 26, 28, 0.3);
    transform: scale(1.05);
}

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

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #000000;
    background-image: 
        radial-gradient(at 0% 0%, rgba(228, 26, 28, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(228, 26, 28, 0.03) 0px, transparent 50%);
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.auth-box {
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid rgba(228, 26, 28, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.auth-box .logo-img {
    height: 48px;
    width: auto;
    margin: 0 auto 1.5rem;
    display: block;
    filter: drop-shadow(0 0 10px rgba(228, 26, 28, 0.4));
}

.auth-box .logo {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.auth-box h2 {
    font-family: 'Exo 2', 'Orbitron', sans-serif;
    text-align: center;
    margin-bottom: 2rem;
    color: #e0e0e0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: 'Exo 2', 'Rajdhani', sans-serif;
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-group input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    color: #e0e0e0;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-group input:focus {
    border-color: rgba(228, 26, 28, 0.5);
    box-shadow: 0 0 10px rgba(228, 26, 28, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

.auth-btn {
    font-family: 'Exo 2', 'Rajdhani', sans-serif;
    background: rgba(228, 26, 28, 0.2);
    color: #e41a1c;
    border: 1px solid rgba(228, 26, 28, 0.4);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.auth-btn:hover {
    background: rgba(228, 26, 28, 0.3);
    border-color: rgba(228, 26, 28, 0.6);
    box-shadow: 0 0 15px rgba(228, 26, 28, 0.3);
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #999;
    font-size: 0.9rem;
}

.auth-link a {
    color: #e41a1c;
    text-decoration: none;
    transition: text-shadow 0.3s;
}

.auth-link a:hover {
    text-shadow: 0 0 8px rgba(228, 26, 28, 0.5);
}

.auth-link a:hover {
    text-decoration: underline;
}

.error-message {
    background-color: #4a1a1a;
    border: 1px solid #6a2a2a;
    color: #ff6b6b;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.success-message {
    background-color: #1a4a1a;
    border: 1px solid #2a6a2a;
    color: #6bff6b;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Upgrade Page */
.upgrade-container {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.upgrade-box {
    max-width: 900px;
    width: 100%;
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid rgba(228, 26, 28, 0.2);
    border-radius: 16px;
    padding: 3rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    margin: auto;
}

.upgrade-box h2 {
    font-family: 'Exo 2', 'Orbitron', sans-serif;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #e41a1c;
    text-shadow: 0 0 10px rgba(228, 26, 28, 0.4);
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.upgrade-description {
    text-align: center;
    color: #999;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.pricing-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.plan-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.3s;
}

.plan-card:hover {
    border-color: rgba(228, 26, 28, 0.3);
    box-shadow: 0 4px 20px rgba(228, 26, 28, 0.1);
}

.plan-card.featured {
    border-color: rgba(228, 26, 28, 0.4);
    border-width: 2px;
    box-shadow: 0 0 20px rgba(228, 26, 28, 0.2);
}

.plan-card h3 {
    font-family: 'Exo 2', 'Orbitron', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #e0e0e0;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: #e0e0e0;
    margin-bottom: 1.5rem;
}

.plan-price span {
    font-size: 1rem;
    font-weight: normal;
    color: #999;
}

.plan-features {
    list-style: none;
    flex: 1;
    margin-bottom: 2rem;
}

.plan-features li {
    padding: 0.75rem 0;
    color: #ccc;
    border-bottom: 1px solid #2a2a2a;
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li::before {
    content: "✓ ";
    color: #e41a1c;
    font-weight: bold;
    margin-right: 0.5rem;
    text-shadow: 0 0 6px rgba(228, 26, 28, 0.5);
}

.plan-btn {
    font-family: 'Exo 2', 'Rajdhani', sans-serif;
    background: rgba(228, 26, 28, 0.2);
    color: #e41a1c;
    border: 1px solid rgba(228, 26, 28, 0.4);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.plan-btn:hover:not(.current) {
    background: rgba(228, 26, 28, 0.3);
    border-color: rgba(228, 26, 28, 0.6);
    box-shadow: 0 0 15px rgba(228, 26, 28, 0.3);
}

.plan-btn.current {
    background: rgba(255, 255, 255, 0.05);
    color: #666;
    border-color: rgba(255, 255, 255, 0.1);
    cursor: default;
}

/* Loading Animation */
.loading-dots {
    display: inline-block;
}

.loading-dots span {
    animation: loading 1.4s infinite ease-in-out;
    display: inline-block;
}

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

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

@keyframes loading {
    0%, 80%, 100% {
        opacity: 0.3;
    }
    40% {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .header {
        padding: 0.75rem 1.5rem;
        flex-wrap: wrap;
    }
    
    .header-left {
        width: auto;
    }
    
    .logo-img {
        height: 28px;
    }
    
    .header-nav {
        gap: 1.5rem;
        position: static;
        transform: none;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid #333;
        order: 3;
    }
    
    .nav-link {
        font-size: 0.8rem;
    }
    
    .header-right {
        width: auto;
    }
    
    .upgrade-btn, .login-btn, .register-btn, .logout-btn {
        padding: 0.35rem 0.9rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        min-height: auto;
    }
    
    .logo-img {
        height: 24px;
    }
    
    .header-nav {
        gap: 1rem;
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid #333;
        position: static;
        transform: none;
    }
    
    .nav-link {
        font-size: 0.75rem;
    }
    
    .header-right {
        width: auto;
    }
    
    .upgrade-btn, .login-btn, .register-btn, .logout-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .chat-container {
        padding: 0 0.5rem;
    }
    
    .welcome-message h2 {
        font-size: 1.5rem;
    }
    
    .auth-box {
        padding: 2rem;
    }
    
    .upgrade-box {
        padding: 2rem;
    }
    
    .pricing-plans {
        grid-template-columns: 1fr;
    }
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: rgba(228, 26, 28, 0.3);
    box-shadow: 0 4px 20px rgba(228, 26, 28, 0.1);
    transform: translateY(-2px);
}

.project-card h3 {
    font-family: 'Exo 2', 'Orbitron', sans-serif;
    color: #e41a1c;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.project-card p {
    color: #ccc;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.download-btn {
    font-family: 'Exo 2', 'Rajdhani', sans-serif;
    width: 100%;
    padding: 0.75rem;
    background: rgba(228, 26, 28, 0.2);
    color: #e41a1c;
    border: 1px solid rgba(228, 26, 28, 0.4);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.lock-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.download-btn:hover {
    background: rgba(228, 26, 28, 0.3);
    border-color: rgba(228, 26, 28, 0.6);
    box-shadow: 0 0 12px rgba(228, 26, 28, 0.3);
}

.download-btn.locked {
    opacity: 0.7;
    cursor: not-allowed;
}

.download-btn.locked:hover {
    opacity: 0.8;
}

.lock-icon {
    font-size: 1rem;
}

