/* Material Design Variables */
:root {
    --primary-color: #1976d2;
    --primary-variant: #115293;
    --secondary-color: #03dac6;
    --background: #fafafa;
    --surface: #ffffff;
    --text-primary: rgba(0, 0, 0, 0.87);
    --text-secondary: rgba(0, 0, 0, 0.60);
    --elevation-2: 0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12);
    --elevation-4: 0px 2px 4px -1px rgba(0,0,0,0.2), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px 0px rgba(0,0,0,0.12);
    --elevation-8: 0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12);
    --font-family: 'Roboto', sans-serif;
    --border-radius: 4px;
    --border-radius-large: 8px;
    --transition-standard: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --background: #121212;
    --surface: #1e1e1e;
    --text-primary: rgba(255, 255, 255, 0.87);
    --text-secondary: rgba(255, 255, 255, 0.60);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    transition: background-color var(--transition-standard);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* App Bar */
.app-bar {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--elevation-4);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 500;
}

.app-bar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.time-widget {
    text-align: right;
}

.current-time {
    font-size: 18px;
    font-weight: 500;
}

.current-date {
    font-size: 14px;
    opacity: 0.8;
}

.icon-button {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}

.icon-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.icon-button.primary {
    background-color: var(--primary-color);
    color: white;
}

/* Cards */
.card {
    background-color: var(--surface);
    border-radius: var(--border-radius-large);
    transition: all var(--transition-standard);
    overflow: hidden;
}

.card.elevated {
    box-shadow: var(--elevation-2);
}

.card.hoverable:hover {
    box-shadow: var(--elevation-8);
    transform: translateY(-2px);
}

.card-content {
    padding: 16px;
}

.card-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.card-actions {
    padding: 8px 16px 16px;
    display: flex;
    gap: 8px;
}

/* Main Content */
.main-content {
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Greeting Card */
.greeting-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-variant));
    color: white;
}

.greeting-text {
    font-size: 32px;
    font-weight: 300;
    margin-bottom: 8px;
}

.greeting-subtitle {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 24px;
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.weather-icon {
    font-size: 32px;
    color: #ffa726;
}

.weather-details {
    display: flex;
    flex-direction: column;
}

.temperature {
    font-size: 24px;
    font-weight: 300;
}

.weather-condition {
    font-size: 14px;
    opacity: 0.8;
}

/* Buttons */
.text-button {
    background: none;
    border: none;
    color: white;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.15s;
}

.text-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Search */
.chip-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    background-color: var(--background);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 16px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    width: 120px;
    height: 40px;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative; /* 为涟漪效果容器提供定位上下文 */
}

.chip .material-icons {
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chip:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.chip.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.chip.selected .material-icons {
    color: white;
}

/* 涟漪效果容器 */
.chip .ripple-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

/* 涟漪效果 */
.ripple {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
}

@keyframes ripple-animation {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

.input-container {
    display: flex;
    align-items: center;
    background-color: var(--background);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    gap: 12px;
    transition: border-color 0.15s;
}

.input-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

#search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-primary);
    font-family: var(--font-family);
}

/* Quick Access */
.section-title {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.quick-card {
    text-decoration: none;
    color: inherit;
    padding: 20px 16px;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.card-icon .material-icons {
    font-size: 24px;
    color: white;
}

/* Brand Colors */
.card-icon.gmail { background: #ea4335; }
.card-icon.youtube { background: #ff0000; }
.card-icon.amazon { background: #ff9900; }
.card-icon.netflix { background: #e50914; }
.card-icon.reddit { background: #ff4500; }
.card-icon.twitter { background: #1da1f2; }
.card-icon.github { background: #333; }
.card-icon.linkedin { background: #0077b5; }
.card-icon.spotify { background: #1db954; }
.card-icon.facebook { background: #1877f2; }
.card-icon.instagram { background: #e4405f; }
.card-icon.wikipedia { background: #000; }

/* News */
.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.news-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.news-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text-primary);
}

.news-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Loading */
.loading-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--text-secondary);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* FAB */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--elevation-8);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-standard);
    z-index: 50;
    transform: scale(0);
}

.fab.visible {
    transform: scale(1);
}

.fab:hover {
    transform: scale(1.1);
}
.search-engines{
    margin-bottom: 5px
}
/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 0 12px;
    }
    
    .app-bar-content {
        height: 56px;
        flex-direction: column;
        gap: 8px;
        padding: 8px 0;
    }
    .app-bar-actions{
        display: none;
    }
    .main-content {
        padding: 16px 0;
        gap: 16px;
    }
    
    .greeting-text {
        font-size: 24px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .quick-card {
        padding: 16px 12px;
        min-height: 100px;
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
    }
    
    .news-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Responsive chips for mobile */
    .chip {
        width: 100px;
        height: 36px;
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .chip-group {
        justify-content: center;
    }
    
    .chip .material-icons {
        margin-right: 6px;
        font-size: 18px;
    }
}

/* Privacy and Terms Pages */
.content-wrapper {
    line-height: 1.6;
}

.content-wrapper h2 {
    margin: 24px 0 12px 0;
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
}

.content-wrapper p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.content-wrapper ul {
    margin: 16px 0 16px 32px;
    color: var(--text-secondary);
}

.content-wrapper li {
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

.footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    margin: 0 16px;
    font-size: 14px;
}

.footer-links a:hover {
    text-decoration: underline;
}
