/* Claude-Style Home Screen */

/* Home Screen Container - Full viewport centered */
.home-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: var(--space-8);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Greeting Section */
.home-greeting {
    text-align: center;
    margin-bottom: var(--space-12);
    animation: fadeIn 0.8s ease-out;
}

.home-greeting-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    position: relative;
    display: none;
    /* Hide logo as requested */
}

/* Animated Logo Container */
.animated-logo {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
    perspective: 1000px;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* 3D Hexagon Container */
.logo-hexagon {
    width: 180px;
    height: 180px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate3D 12s linear infinite;
}

@keyframes rotate3D {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }

    33% {
        transform: rotateX(20deg) rotateY(120deg) rotateZ(10deg);
    }

    66% {
        transform: rotateX(-20deg) rotateY(240deg) rotateZ(-10deg);
    }

    100% {
        transform: rotateX(0deg) rotateY(360deg) rotateZ(0deg);
    }
}

/* Hexagon Shape with Stripes */
.hexagon-shape {
    width: 100%;
    height: 100%;
    position: relative;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    overflow: hidden;
}

/* Animated Stripes */
.hexagon-stripes {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.15) 10px,
            rgba(255, 255, 255, 0.15) 20px);
    animation: moveStripes 3s linear infinite;
}

@keyframes moveStripes {
    0% {
        transform: translate(0, 0) rotate(45deg);
    }

    100% {
        transform: translate(40px, 40px) rotate(45deg);
    }
}

/* Glow Effect */
.hexagon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Orbital Rings Around Hexagon */
.logo-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    opacity: 0.3;
}

.logo-ring-1 {
    width: 220px;
    height: 220px;
    animation: rotateRing 10s linear infinite;
}

.logo-ring-2 {
    width: 260px;
    height: 260px;
    animation: rotateRing 15s linear infinite reverse;
}

@keyframes rotateRing {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.home-greeting-text {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-greeting-subtext {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Main Input Section */
.home-input-section {
    width: 100%;
    max-width: 900px;
    margin-bottom: var(--space-8);
}

.home-input-wrapper {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: 1.5rem;
    padding: var(--space-2);
    box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.home-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.3),
        0px 0px 0px 1px var(--border-medium);
    transform: translateY(-1px);
    background: var(--bg-tertiary);
}

.home-input-container {
    display: flex;
    align-items: flex-end;
    gap: var(--space-3);
    padding: var(--space-2);
    box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.15);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
}

.home-input-field {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-family: var(--font-sans);
    line-height: 1.6;
    padding: var(--space-4) var(--space-3);
    resize: none;
    min-height: 24px;
    max-height: 200px;
    transition: all 0.2s ease;
}

.home-input-field:focus {
    color: var(--text-primary);
}

.home-input-field::placeholder {
    color: var(--text-tertiary);
}

/* Provider Selector - Integrated Clean */
.home-provider-selector {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    border: 1px solid var(--border-medium);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    height: 36px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.home-provider-selector:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}

.home-provider-selector select {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    padding: var(--space-1);
}

/* Style the dropdown options - force dark theme */
.home-provider-selector select option,
.provider-select-home option {
    background-color: var(--bg-secondary) !important;
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    padding: var(--space-3) var(--space-4);
    font-size: 0.9375rem;
    border: none;
}

.home-provider-selector select option:checked,
.provider-select-home option:checked {
    background: var(--bg-elevated) !important;
    background-color: var(--bg-elevated) !important;
}

.home-provider-selector select option:hover,
.provider-select-home option:hover {
    background: var(--bg-tertiary) !important;
    background-color: var(--bg-tertiary) !important;
}

.home-provider-selector i {
    color: var(--primary);
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.9;
}

.home-provider-selector:hover i {
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.35));
}

/* Send Button - Clean Square */
.home-send-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-medium);
    border-radius: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.home-send-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.3);
}

.home-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

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

.home-send-btn i {
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
}

.home-send-btn:hover:not(:disabled) i {
    opacity: 1;
    transform: translateY(-1px);
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
}

/* Quick Actions */
.home-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
    margin-bottom: var(--space-8);
    animation: fadeIn 1s ease-out 0.2s both;
}

.home-quick-action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-medium);
    border-radius: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.home-quick-action i {
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
    color: var(--text-tertiary);
}

.home-quick-action:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.25);
}

.home-quick-action:hover i {
    transform: scale(1.15) translateY(-1px);
    color: var(--primary);
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.4));
}

.home-quick-action:active {
    transform: translateY(0);
}

/* Example Prompts Grid */
.home-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
    max-width: 1000px;
    width: 100%;
    animation: fadeIn 1.2s ease-out 0.4s both;
}

.home-example-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 1.25rem;
    padding: var(--space-5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.home-example-card:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.3);
}

.home-example-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 0.75rem;
    margin-bottom: var(--space-3);
    color: var(--primary);
    font-size: 1.125rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-medium);
    position: relative;
    overflow: hidden;
}

.home-example-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--bg-elevated);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.home-example-card:hover .home-example-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
    border-color: var(--primary);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.3);
}

.home-example-card:hover .home-example-icon::before {
    width: 100%;
    height: 100%;
}

.home-example-card:hover .home-example-icon i {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.home-example-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.home-example-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .home-greeting-text {
        font-size: 2rem;
    }

    .home-greeting-subtext {
        font-size: 1rem;
    }

    .home-input-section {
        max-width: 100%;
    }

    .home-quick-actions {
        gap: var(--space-2);
    }

    .home-quick-action {
        padding: var(--space-2) var(--space-4);
        font-size: 0.875rem;
    }

    .home-examples {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
}

/* Hide home screen when chat is active */
.chat-container.active~.home-screen,
.chat-messages:not(:empty)~.home-screen {
    display: none;
}

/* Hide chat header when home screen is visible */
.home-screen:not([style*="display: none"])~.chat-input-container {
    display: none !important;
}

body:has(.home-screen:not([style*="display: none"])) .chat-header {
    display: none;
}

body:has(.home-screen:not([style*="display: none"])) .chat-input-container {
    display: none !important;
}

body:has(.home-screen:not([style*="display: none"])) #attachedFilesPreview {
    display: none;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: var(--space-4);
    left: var(--space-4);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-medium);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle i {
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
}

.sidebar-toggle:hover i {
    transform: scale(1.15);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(226, 109, 92, 0.6));
}

/* Sidebar collapsed state handled in modern.css */

/* Adjust main content when sidebar is collapsed - full width centering */
body:has(.sidebar.collapsed) .main-content {
    width: 100vw;
    margin-left: 0;
}

/* Ensure home screen is centered */
.home-screen {
    margin: 0 auto;
    width: 100%;
}

/* Show toggle button always */
.sidebar-toggle {
    display: flex;
}
