body {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    background: #f0f0f0;
}

.browser {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    overflow: hidden;
    height: 98vh;  /* Make browser take up most of viewport */
}

.browser-header {
    padding: 15px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.logo {
    display: inline-flex;
    align-items: center;
    margin-right: 20px;
    transition: transform 0.2s;
    cursor: pointer;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-text {
    font-size: 26px;
    font-weight: bold;
    background: linear-gradient(45deg, #4285f4, #0f9d58);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 10px;
}

.controls {
    display: inline-flex;
    gap: 5px;
    margin-right: 15px;
    background: #f1f3f4;
    padding: 5px;
    border-radius: 25px;
}

.control-btn {
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 20px;
    color: #5f6368;
    transition: all 0.2s;
}

.control-btn:hover {
    background: #e8eaed;
    color: #202124;
}

.address-bar {
    display: inline-flex;
    flex: 1;
    align-items: center;
    max-width: 900px;
}

#urlInput {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    background: rgba(241, 243, 244, 0.8);
    transition: all 0.2s;
    margin-right: 10px;
}

#urlInput:focus {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    outline: none;
}

.address-bar button {
    padding: 12px 25px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.address-bar button:hover {
    background: #1a73e8;
    box-shadow: 0 2px 8px rgba(26,115,232,0.3);
}

.content-area {
    height: calc(100vh - 90px);
    position: relative;
}

#webview {
    width: 100%;
    height: 100%;
    border: none;
}

.search-results {
    display: none;
    padding: 20px;
    background: white;
    height: 100%;
    overflow-y: auto;
}

.loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-result {
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 8px;
    padding: 15px;
    animation: fadeIn 0.3s ease-out;
}

.search-result:hover {
    background-color: #f5f5f5;
}

.search-result h3 {
    margin: 0 0 5px 0;
    color: #1a0dab;
}

.search-result p {
    margin: 0;
    color: #4d5156;
}

.ai-generated-content {
    padding: 20px;
    line-height: 1.6;
}

.ai-generated-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

.main-content {
    display: block;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 40px;
    text-align: center;
    overflow-y: auto;
}

.hero-section {
    margin-bottom: 60px;
}

.hero-section h1 {
    font-size: 48px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 800;
}

.hero-section p {
    font-size: 20px;
    color: #34495e;
    margin-bottom: 30px;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px 25px;
    font-size: 18px;
    border: none;
    border-radius: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.search-box button {
    padding: 15px 35px;
    font-size: 18px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-box button:hover {
    transform: scale(1.05);
}

.quick-categories {
    margin-top: 60px;
}

.quick-categories h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 30px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.category-card {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: var(--theme-color, #4285f4);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--theme-color, #4285f4), var(--accent-color, #0f9d58));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover::before {
    opacity: 1;
}

.category-icon {
    font-size: 38px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: rgba(66, 133, 244, 0.1);
    border-radius: 50%;
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.category-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.category-description {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
    line-height: 1.5;
}

.categories-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.categories-header h2 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.categories-header p {
    font-size: 18px;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

.category-metrics {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    font-size: 12px;
    color: #95a5a6;
}

.category-metric {
    display: flex;
    align-items: center;
    gap: 4px;
}

.recent-searches {
    margin-top: 40px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 1000px;
    margin: 40px auto 0;
}

.recent-searches h2 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.recent-search-item {
    display: flex;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.recent-search-item:hover {
    background-color: #f5f5f5;
}

.recent-search-icon {
    margin-right: 12px;
    font-size: 18px;
}

.recent-search-query {
    flex: 1;
    font-size: 16px;
    color: #2c3e50;
}

.recent-search-time {
    color: #95a5a6;
    font-size: 14px;
    margin-left: 12px;
}

.service-container {
    height: 100%;
    padding: 30px;
    background: #fafafa;
}

.youtube-container {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 20px;
    height: 100%;
}

.video-player {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.video-player:hover {
    transform: scale(1.01);
}

.video-suggestions {
    overflow-y: auto;
}

.translate-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    height: calc(100% - 40px);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.translate-box {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.translate-box:hover {
    transform: translateY(-2px);
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: #4285f4 #f1f3f4;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.chat-input input:focus {
    outline: 2px solid #4285f4;
}

.scratch-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    height: 100%;
}

.blocks-palette {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 15px;
}

.preview-area {
    background: white;
    border-radius: 12px;
    border: 1px solid #ddd;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .browser-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .youtube-container,
    .translate-container,
    .scratch-container {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
}