* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0f0f0f;
    color: #e0e0e0;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0f0f0f;
}

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 70px;
    height: 60px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    padding: 0 30px;
    gap: 20px;
    z-index: 100;
    border-bottom: 1px solid #2a2a2a;
}

.logo-button {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.logo-button:hover {
    background: #2a2a2a;
}

.top-logo-icon {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.top-logo-text {
    height: 24px;
    width: auto;
    object-fit: contain;
}

/* Prompt Container */
.prompt-container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 850px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 10px 14px;
    margin: 0 auto;
    position: relative;
    gap: 12px;
    transition: border-color 0.2s ease;
    flex-wrap: wrap;
}

.prompt-container:focus-within {
    border-color: #3a3a3a;
}

/* Prompt Input */
.prompt-input {
    flex: 1;
    padding: 0;
    background: transparent;
    border: none;
    color: #e0e0e0;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    resize: none;
    overflow-y: auto;
    max-height: 150px;
    line-height: 1.6;
}

.prompt-input::placeholder {
    color: #666;
}

/* Custom Scrollbar for textarea */
.prompt-input::-webkit-scrollbar {
    width: 6px;
}

.prompt-input::-webkit-scrollbar-track {
    background: transparent;
}

.prompt-input::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 3px;
}

.prompt-input::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

/* Model Selector */
.model-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.model-selector:hover {
    background: #1a1a1a;
    border-color: #3a3a3a;
}

.claude-logo {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    object-fit: contain;
}

.model-option .claude-logo {
    width: 16px;
    height: 16px;
}

.dropdown-arrow {
    color: #666;
    flex-shrink: 0;
}

.model-name {
    font-size: 12px;
    font-weight: 500;
    color: #999;
    white-space: nowrap;
}

.model-cost {
    font-size: 11px;
    color: #5865F2;
    font-weight: 600;
    margin-left: 2px;
}

/* Model Dropdown */
.model-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    width: 200px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 4px;
    z-index: 102;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s ease;
}

.model-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.model-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #e0e0e0;
}

.model-option:hover {
    background: #2a2a2a;
}

.model-option.selected {
    background: #2a2a2a;
}

/* Sidebar */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 70px;
    height: 100vh;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-left: 1px solid #2a2a2a;
    z-index: 101;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: #2a2a2a;
    color: #e0e0e0;
}

.home-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.profile-section {
    margin-bottom: 10px;
}

.profile-pic {
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.profile-pic:hover {
    background: #3a3a3a;
}

.profile-pic.small {
    width: 28px;
    height: 28px;
}

/* Profile Dropdown */
.profile-dropdown {
    position: fixed;
    right: 80px;
    bottom: 25px;
    width: 200px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 4px;
    z-index: 102;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all 0.15s ease;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    color: #e0e0e0;
    font-size: 13px;
}

.dropdown-item:hover {
    background: #2a2a2a;
}

.dropdown-item.profile-item {
    font-weight: 500;
}

.dropdown-item.logout {
    color: #ff6b6b;
}

.dropdown-item.logout:hover {
    background: rgba(255, 107, 107, 0.1);
}

.dropdown-item svg {
    flex-shrink: 0;
    color: #999;
}

.dropdown-item.logout svg {
    color: #ff6b6b;
}

.dropdown-item.credits-item {
    pointer-events: none;
    color: #e0e0e0;
}

.dropdown-item.credits-item strong {
    color: #5865F2;
}

.credits-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.dropdown-divider {
    height: 1px;
    background: #2a2a2a;
    margin: 4px 0;
}

/* Projects Panel */
.projects-panel {
    position: fixed;
    right: 70px;
    top: 0;
    width: 0;
    height: 100vh;
    background: #1a1a1a;
    border-left: 1px solid #2a2a2a;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
}

.projects-panel.active {
    width: 320px;
    padding: 20px 15px;
    opacity: 1;
    visibility: visible;
}

.projects-title {
    font-size: 16px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 16px;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.projects-item {
    padding: 12px;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.projects-item:hover {
    background: #1a1a1a;
    border-color: #3a3a3a;
}

.projects-thumb {
    width: 100%;
    height: 100px;
    background: #2a2a2a;
    border-radius: 6px;
    margin-bottom: 10px;
    background-size: cover;
    background-position: center;
}

.projects-name {
    font-size: 13px;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.projects-meta {
    font-size: 11px;
    color: #666;
}

body:has(.projects-panel.active) .main-content {
    margin-right: 390px;
    width: calc(100vw - 390px);
}

/* Main Content */
.main-content {
    margin-top: 60px;
    margin-right: 70px;
    padding: 30px 40px;
    min-height: calc(100vh - 60px);
}

/* Search Section */
.search-section {
    margin-bottom: 30px;
}

.search-box {
    position: relative;
    max-width: 500px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 42px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: #3a3a3a;
}

.search-input::placeholder {
    color: #666;
}

.content-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 16px;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.project-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
}

.project-card:hover {
    border-color: #3a3a3a;
}

.project-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #2a2a2a;
    position: relative;
}

.project-info {
    padding: 10px 12px;
}

.creator-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.creator-avatar {
    width: 24px;
    height: 24px;
    background: #333;
    border-radius: 50%;
    flex-shrink: 0;
}

.creator-name {
    font-size: 13px;
    font-weight: 500;
    color: #999;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state p {
    font-size: 16px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .top-bar {
        padding: 0 15px;
        right: 60px;
    }
    
    .prompt-container {
        max-width: 100%;
    }
    
    .sidebar {
        width: 60px;
    }
    
    .main-content {
        margin-right: 60px;
        padding: 20px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 12px;
    }
}
