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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #ffffff;
    color: #3c4043;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER - Google stilius */
.header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 20px;
    height: 60px;
    gap: 20px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.amail-link {
    color: #5f6368;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.amail-link:hover {
    background: #f1f3f4;
    text-decoration: none;
}

.apps-menu {
    position: relative;
}

.apps-button {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apps-button:hover {
    background: #f1f3f4;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid #dadce0;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 280px;
    z-index: 1000;
    display: none;
}

.apps-grid.show {
    display: grid;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #3c4043;
    transition: background 0.2s;
    text-align: center;
}

.app-item:hover {
    background: #f8f9fa;
    text-decoration: none;
}

.app-icon {
    font-size: 20px;
    margin-bottom: 6px;
}

.app-name {
    font-size: 12px;
    line-height: 1.2;
}

.login-btn {
    background: #1a73e8;
    color: white !important;
    padding: 10px 26px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.login-btn:hover {
    background: #1b66c9;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a73e8;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}

.user-avatar.show {
    display: flex;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* LOGO - Storesnės raidės */
.logo {
    margin: 60px 0 30px 0;
    text-align: center;
}

.logo-text {
    font-size: 84px;
    font-weight: 500;
    letter-spacing: -3px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .logo-text {
        font-size: 48px;
        letter-spacing: -1px;
        font-weight: 500;
    }
}

.logo-text span { 
    transition: transform 0.2s; 
}
.logo-text span:hover { 
    transform: scale(1.1); 
}

.logo-text span:nth-child(1) { color: #4285f4; }
.logo-text span:nth-child(2) { color: #ea4335; }
.logo-text span:nth-child(3) { color: #fbbc05; }
.logo-text span:nth-child(4) { color: #4285f4; }
.logo-text span:nth-child(5) { color: #34a853; }
.logo-text span:nth-child(6) { color: #ea4335; }
.logo-text span:nth-child(7) { color: #fbbc05; }
.logo-text span:nth-child(8) { color: #4285f4; }
.logo-text span:nth-child(9) { color: #34a853; }
.logo-text span:nth-child(10) { color: #ea4335; }

.tagline {
    color: #5f6368;
    font-size: 18px;
    margin-bottom: 50px;
    text-align: center;
}

/* GOOGLE-STYLE SEARCH */
.search-box-container {
    width: 100%;
    max-width: 584px;
    margin: 0 auto 30px auto;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-box {
    width: 100%;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    padding: 12px 100px 12px 20px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 1px 6px rgba(32,33,36,0.08);
}

.search-box:hover,
.search-box:focus {
    box-shadow: 0 1px 8px rgba(32,33,36,0.15);
    border-color: rgba(223,225,229,0);
}

.search-buttons-container {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}

.search-action-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.search-action-btn:hover {
    background: #f1f3f4;
}

.search-action-btn.listening {
    background: #ea4335;
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
    100% { transform: translateY(-50%) scale(1); }
}

.deepseek-btn {
    color: #666ee8;
}

.voice-search-btn {
    color: #4285f4;
}

/* AUTOSUGGESTIONS */
.autosuggest-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid #dfe1e5;
    border-top: none;
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.autosuggest-container.show {
    display: block;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

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

.suggestion-item:hover,
.suggestion-item.selected {
    background: #f8f9fa;
}

.suggestion-icon {
    color: #5f6368;
    font-size: 14px;
}

.suggestion-text {
    flex: 1;
    font-size: 16px;
}

.search-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.search-btn {
    background: #f8f9fa;
    border: 1px solid #f8f9fa;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 14px;
    color: #3c4043;
    cursor: pointer;
    transition: all 0.2s;
}

.search-btn:hover {
    border: 1px solid #dadce0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.auto-search-toggle {
    background: #1a73e8;
    color: white !important;
}

.auto-search-toggle.off {
    background: #5f6368;
}

/* QUICK LINKS */
.quick-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #5f6368;
    font-size: 14px;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s;
    min-width: 80px;
}

.quick-link:hover {
    background: #f8f9fa;
    text-decoration: none;
    transform: translateY(-2px);
}

.quick-link-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

/* CHAT MODAL */
.chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.chat-modal.show {
    display: flex;
}

.chat-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    height: 80%;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}

.chat-header {
    background: #1a73e8;
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-clear-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    margin-right: 8px;
}

.chat-clear-btn:hover {
    background: rgba(255,255,255,0.2);
}

.chat-title {
    font-size: 18px;
    font-weight: 500;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.chat-close:hover {
    background: rgba(255,255,255,0.2);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
}

.message.user {
    align-self: flex-end;
    background: #1a73e8;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.assistant {
    align-self: flex-start;
    background: #f1f3f4;
    color: #3c4043;
    border-bottom-left-radius: 4px;
}

.message.thinking {
    align-self: flex-start;
    background: #f8f9fa;
    color: #5f6368;
    font-style: italic;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5f6368;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
    0%, 80%, 100% { 
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

.chat-input-container {
    padding: 16px 20px;
    border-top: 1px solid #dadce0;
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input {
    flex: 1;
    border: 1px solid #dadce0;
    border-radius: 24px;
    padding: 12px 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: #1a73e8;
}

.chat-send-btn {
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-send-btn:hover {
    background: #1b66c9;
}

.chat-send-btn:disabled {
    background: #dadce0;
    cursor: not-allowed;
}

/* Voice Recognition Modal */
.voice-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.voice-modal.show {
    display: flex;
}

.voice-modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.voice-modal-icon {
    font-size: 60px;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.voice-modal-text {
    font-size: 18px;
    margin-bottom: 15px;
    color: #3c4043;
}

.voice-modal-result {
    font-size: 16px;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #dadce0;
}

/* Alternatyvios įvesties stilius */
.voice-modal-alternative {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px dashed #dadce0;
    transition: all 0.3s ease;
}

.voice-modal-alternative p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #5f6368;
    text-align: center;
}

.voice-modal-alternative input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.voice-modal-alternative input:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.voice-modal-alternative .hint {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #9aa0a6;
    text-align: center;
}

.voice-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.voice-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.voice-modal-search {
    background: #1a73e8;
    color: white;
}

.voice-modal-search:hover {
    background: #1b66c9;
}

.voice-modal-cancel {
    background: #f1f3f4;
    color: #3c4043;
}

.voice-modal-cancel:hover {
    background: #dadce0;
}

/* FOOTER */
.footer {
    background: #f2f2f2;
    padding: 20px;
    border-top: 1px solid #dadce0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 14px;
    color: #5f6368;
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    color: #5f6368;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #1a73e8;
    text-decoration: underline;
}

/* DARK MODE */
@media (prefers-color-scheme: dark) {
    body {
        background: #202124;
        color: #e8eaed;
    }
    
    .search-box {
        background: #303134;
        border-color: #5f6368;
        color: #e8eaed;
    }
    
    .search-box:hover,
    .search-box:focus {
        background: #303134;
        border-color: #5f6368;
    }
    
    .search-btn {
        background: #303134;
        border-color: #5f6368;
        color: #e8eaed;
    }
    
    .autosuggest-container {
        background: #303134;
        border-color: #5f6368;
    }
    
    .suggestion-item {
        border-bottom-color: #5f6368;
        color: #e8eaed;
    }
    
    .suggestion-item:hover,
    .suggestion-item.selected {
        background: #3c4043;
    }
    
    .search-action-btn:hover {
        background: #3c4043;
    }
    
    .quick-link {
        color: #e8eaed;
    }
    
    .quick-link:hover {
        background: #3c4043;
    }
    
    .footer {
        background: #171717;
        border-color: #5f6368;
    }
    
    .amail-link, .footer-links a {
        color: #e8eaed;
    }
    
    .tagline {
        color: #9aa0a6;
    }
    
    .apps-grid {
        background: #303134;
        border-color: #5f6368;
    }
    
    .app-item {
        color: #e8eaed;
    }
    
    .app-item:hover {
        background: #3c4043;
    }

    .voice-modal-content,
    .chat-modal-content {
        background: #303134;
        color: #e8eaed;
    }

    .voice-modal-result {
        background: #202124;
        border-color: #5f6368;
        color: #e8eaed;
    }

    .voice-modal-alternative {
        background: #202124;
        border-color: #5f6368;
    }

    .voice-modal-alternative input {
        background: #303134;
        border-color: #5f6368;
        color: #e8eaed;
    }

    .voice-modal-alternative input:focus {
        border-color: #1a73e8;
    }

    .voice-modal-cancel {
        background: #5f6368;
        color: #e8eaed;
    }

    .voice-modal-cancel:hover {
        background: #3c4043;
    }

    .chat-input {
        background: #202124;
        border-color: #5f6368;
        color: #e8eaed;
    }

    .message.assistant {
        background: #3c4043;
        color: #e8eaed;
    }

    .message.thinking {
        background: #202124;
        color: #9aa0a6;
    }

    .chat-input-container {
        border-color: #5f6368;
    }
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 768px) {
    .header {
        padding: 10px 15px;
        gap: 15px;
    }
    
    .nav-right {
        gap: 15px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-links {
        gap: 20px;
    }
    
    .apps-grid {
        right: 0;
        min-width: 250px;
    }
    
    .search-box-container {
        padding: 0 15px;
    }
    
    .search-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .search-btn {
        width: 200px;
    }
    
    .quick-links {
        gap: 15px;
    }
    
    .quick-link {
        min-width: 70px;
        font-size: 12px;
    }

    .voice-modal-content {
        padding: 20px 15px;
    }

    .voice-modal-icon {
        font-size: 50px;
    }

    .voice-modal-text {
        font-size: 16px;
    }

    .chat-modal-content {
        width: 95%;
        height: 90%;
    }

    .message {
        max-width: 90%;
    }

    .voice-modal-buttons {
        flex-direction: column;
    }

    .voice-modal-btn {
        width: 100%;
    }
}
