:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --bg-hover: #f1f3f4;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-tertiary: #80868b;
    --border-color: #dadce0;
    --accent: #1a73e8;
    --accent-hover: #1557b0;
    --marquee-bg: #f8f9fa;
    --shadow: 0 1px 2px 0 rgba(60,64,67,0.1), 0 1px 3px 1px rgba(60,64,67,0.05);
    --shadow-hover: 0 1px 3px 0 rgba(60,64,67,0.15), 0 4px 8px 3px rgba(60,64,67,0.1);
}

[data-theme="dark"] {
    --bg-primary: #202124;
    --bg-secondary: #292a2d;
    --bg-card: #292a2d;
    --bg-hover: #35363a;
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-tertiary: #80868b;
    --border-color: #3c4043;
    --accent: #8ab4f8;
    --accent-hover: #aecbfa;
    --marquee-bg: #292a2d;
    --shadow: 0 1px 2px 0 rgba(0,0,0,0.3), 0 1px 3px 1px rgba(0,0,0,0.15);
    --shadow-hover: 0 1px 3px 0 rgba(0,0,0,0.4), 0 4px 8px 3px rgba(0,0,0,0.2);
}

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

body {
    font-family: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

/* Header */
.header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo-link:hover {
    opacity: 0.8;
}

.chrome-logo {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.logo-text {
    font-size: 22px;
    font-weight: 400;
    color: var(--text-primary);
}

.logo-text span {
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-button {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: background-color 0.2s, color 0.2s;
    text-decoration: none;
}

.icon-button:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.icon-button svg {
    width: 22px;
    height: 22px;
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
}

/* Profile section */
.profile {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 16px 32px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 32px;
    transition: background-color 0.3s ease;
}

.profile-text {
    flex: 1;
}

.profile-text h1 {
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.profile-text .subtitle {
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 12px;
    font-weight: 500;
}

.profile-text p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-primary);
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

/* Marquee */
.marquee-wrapper {
    background-color: var(--marquee-bg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    padding: 14px 0;
    margin-bottom: 16px;
    border-radius: 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.marquee {
    display: flex;
    white-space: nowrap;
    animation: scroll 40s linear infinite;
    width: max-content;
}

.marquee-content {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-right: 20px;
}

.marquee-item {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0 16px;
}

.marquee-separator {
    color: var(--accent);
    font-weight: 700;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-wrapper:hover .marquee {
    animation-play-state: paused;
}

/* Section title */
.section-title {
    font-size: 22px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-left: 4px;
}

/* Extensions grid */
.extensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.extension-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.2s, transform 0.2s, background-color 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.extension-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.extension-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.extension-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background-color: var(--bg-hover);
    flex-shrink: 0;
}

.extension-title-wrapper {
    flex: 1;
    min-width: 0;
}

.extension-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.extension-category {
    font-size: 12px;
    color: var(--text-tertiary);
}

.extension-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.extension-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.store-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 16px;
    background-color: var(--bg-hover);
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.store-link:hover {
    background-color: var(--accent);
    color: #ffffff;
}

.store-link-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .profile {
        flex-direction: column-reverse;
        text-align: center;
        padding: 24px;
        gap: 20px;
    }

    .profile-avatar {
        width: 110px;
        height: 110px;
    }

    .profile-text h1 {
        font-size: 22px;
    }

    .container {
        padding: 16px 16px;
    }

    .header-content {
        padding: 10px 16px;
    }

    .logo-text {
        font-size: 18px;
    }

    .extensions-grid {
        grid-template-columns: 1fr;
    }
}
