* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: white;
}

.header-left {
    width: 50px;
}

.login-btn {
    border-radius: 20px;
    background: #60a5fa;
    color: #ffffff;
    border-color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 12px;
    padding: .45rem .75rem;
}

.login-btn:hover {
    background: #4789f6;
    transform: translateY(-1px);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 100px 20px;
    text-align: center;
}

.ai-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.ai-description {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 50px;
}

/* Search Section */
.search-container {
    width: 100%;
    max-width: 720px;
    position: relative;
}

.search-wrapper {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.attachment-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    color: #666;
}

.attachment-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.web-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    font-size: 14px;
    color: #212121;
    cursor: pointer;
    transition: all 0.2s ease;
}

.web-search-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.search-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 15px;
    background: transparent;
    color: #333;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.4;
}

.search-input::placeholder {
    color: #999;
}

.voice-btn, .send-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    color: #666;
}

.send-btn {
    background: #212121;
    color: white;
}

.voice-btn:hover, .send-btn:hover {
    transform: scale(1.05);
}

.rounded-full {
    border-radius: 9999px;
}

.cost-info {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

/* Footer */
.footer {
    background: white;
    padding: 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #333;
}

/* Breadcrumb */
.breadcrumb {
    position: absolute;
    top: 80px;
    left: 40px;
    display: flex;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #333;
}

.textarea-container {
    width: 100%;
    position: relative;
}

.bottom-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px 5px 0;
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.web-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    font-size: 14px;
    color: #212121;
    cursor: pointer;
    transition: all 0.2s ease;
}

.web-search-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* Toggle active state */
.web-search-btn.active {
    background: #b2d2f2;
    color: #4789f6;
    border-color: #9dc9f4;
}

.web-search-btn.active:hover {
    background: #c3dcf4;
    border-color: #9dc9f4;
}

/* Optional: Add a subtle animation when toggling */
.web-search-btn.active img {
    filter: brightness(0) saturate(100%) invert(27%) sepia(86%) saturate(1945%) hue-rotate(213deg) brightness(103%) contrast(94%);
}

.agree {
    margin-top: 20px;
    font-size: 12px;
    color: #7facf8;
}

.agree a {
    color: #3982fa;
    text-decoration: none;
}

@media (max-width: 768px) {

    .header {
        padding: 15px 20px;
    }

    .ai-title {
        margin-bottom: 20px;
    }

    .main-content {
        padding: 60px 10px 0 10px; /* Remove bottom padding */
        justify-content: flex-start; /* Align content to top */
    }

    .breadcrumb {
        left: 20px;
        top: 70px;
    }

    .footer-links {
        gap: 20px;
    }

    /* Hide footer on mobile */
    .footer {
        display: none;
    }

    /* Web search button - icon only on mobile */
    .web-search-btn {
        width: 40px;
        height: 40px;
        padding: 8px;
        border-radius: 50%;
        justify-content: center;
    }

    .web-search-btn span {
        display: none; /* Hide text */
    }
}

/* Menu toggle animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Update header-left to position relative */
.header-left {
    width: 50px;
    position: relative;
}

/* Dropdown Menu */
.menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 8px;
}

.menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-dropdown a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.menu-dropdown a:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.menu-dropdown a:first-child {
    border-radius: 12px 12px 0 0;
}

.menu-dropdown a:hover {
    background: #f8f9fa;
    color: #2563eb;
}

/* Overlay for mobile */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Menu Button */
.menu-toggle {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.menu-toggle:hover {
    transform: translateY(-1px);
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
    border-radius: 1px;
}

/* Menu toggle animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Update header-left to position relative */
.header-left {
    width: 50px;
    position: relative;
}

/* Dropdown Menu */
.menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 8px;
}

.menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-dropdown a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.menu-dropdown a:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.menu-dropdown a:first-child {
    border-radius: 12px 12px 0 0;
}

.menu-dropdown a:hover {
    background: #f8f9fa;
    color: #2563eb;
}

/* Overlay for mobile */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Styles - Add to your existing mobile media query */
@media (max-width: 768px) {
    .menu-dropdown {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        border-radius: 0;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
        transform: none;
        margin-top: 0;
        overflow-y: auto;
        padding-top: 80px;
        transition: left 0.3s ease;
    }

    .menu-dropdown.active {
        left: 0;
        transform: none;
    }

    .menu-dropdown a {
        padding: 16px 24px;
        font-size: 16px;
        border-bottom: 1px solid #f0f0f0;
        border-radius: 0;
    }

    .menu-dropdown a:first-child {
        border-radius: 0;
    }

    .menu-dropdown a:last-child {
        border-radius: 0;
    }

    /* Close button in mobile menu */
    .menu-dropdown::before {
        content: '×';
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 24px;
        color: #666;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #f8f9fa;
        border: 1px solid #e0e0e0;
        transition: background 0.2s ease;
    }

    .menu-dropdown::before:hover {
        background: #e9ecef;
    }
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    width: 180px;
    visibility: hidden;
    background-color: #2f2f2f;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 110%;
    left: 50%;
    margin-left: -90px;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tooltip arrow */
.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2f2f2f transparent transparent transparent;
}

/* Show tooltip on hover */
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Alternative tooltip positioning for mobile */
@media (max-width: 768px) {
    .tooltip .tooltiptext {
        width: 200px;
        margin-left: -20px; /* Align to the right edge of button instead of center */
        left: 0; /* Override the 50% left positioning */
        bottom: 120%;
        white-space: normal; /* Allow text wrapping if needed */
    }

    /* Adjust arrow position for mobile */
    .tooltip .tooltiptext::after {
        left: 35px; /* Position arrow relative to button position */
        margin-left: 0;
    }
}

/* For very small screens, position tooltip above and to the right */
@media (max-width: 480px) {
    .tooltip .tooltiptext {
        width: 180px;
        margin-left: -10px;
        left: 0;
        bottom: 120%;
    }

    .tooltip .tooltiptext::after {
        left: 30px;
    }
}

@media (max-width: 768px) {

    /* Existing mobile styles... */
    /* Fix tooltip positioning for right-side controls */
    .right-controls .tooltip .tooltiptext {
        width: 200px;
        /* Position tooltip to the left of the button instead of centered */
        right: 0;
        left: auto;
        margin-left: 0;
        /* Move it further left to prevent cutoff */
        transform: translateX(-10px);
    }

    /* Adjust arrow position for right-side tooltips */
    .right-controls .tooltip .tooltiptext::after {
        /* Position arrow on the right side of tooltip */
        left: auto;
        right: 20px;
        margin-left: 0;
    }

    /* Keep existing attachment button tooltip positioning */
    .left-controls .tooltip .tooltiptext {
        width: 200px;
        margin-left: -20px;
        left: 0;
        bottom: 120%;
        white-space: normal;
    }

    .left-controls .tooltip .tooltiptext::after {
        left: 35px;
        margin-left: 0;
    }
}

/* Search Type Dropdown Styles */
.search-type-dropdown {
    position: relative;
    display: inline-block;
}

.search-type-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    font-size: 14px;
    color: #212121;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 130px;
    justify-content: space-between;
}

.search-type-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.search-type-btn.active {
    background: #b2d2f2;
    color: #4789f6;
    border-color: #9dc9f4;
}

.dropdown-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.search-type-btn.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item.selected {
    background: #e3f2fd;
    color: #1976d2;
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.share-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.share-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #60a5fa;
    color: white;
    border: 1px solid #60a5fa;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(91, 163, 245, 0.3);
}

.share-button:hover {
    background: #4789f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 163, 245, 0.4);
}

.share-button:active {
    transform: translateY(0);
}

.share-button svg {
    width: 20px;
    height: 20px;
}

.share-feedback {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.share-feedback.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .share-button-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 15px 20px;
        padding-bottom: calc(15px + env(safe-area-inset-bottom, 0px));
        z-index: 100;
        margin-bottom: 0;
    }

    .share-button {
        padding: 8px 20px;
        font-size: 14px;
    }
}

/* Quick Actions Buttons */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.quick-action-btn:hover {
    background: #f8f9fa;
    border-color: #ccc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-action-btn svg {
    flex-shrink: 0;
}

.deepsearch-btn {
    border: 1px solid #e0e0e0;
    background: white;
}

.deepsearch-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.studio-btn {
    border: 1px solid #e0e0e0;
    background: white;
}

.studio-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

@media (max-width: 768px) {
    .quick-actions {
        gap: 8px;
        margin-top: 12px;
    }

    .quick-action-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .quick-action-btn svg {
        width: 16px;
        height: 16px;
    }
}
