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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: white;
    min-height: 100vh;
    color: #1a1a1a;
}

/* Header Styles */
.page-header {
    background: white;
    border-bottom: 2px solid #e2e8f0;
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.header-nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: #666666;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

.logo-link {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-image {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.logo-text {
    display: inline;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}



/* Authentication Styles */
.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: #1a1a1a;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 26, 26, 0.3);
}

.btn-outline {
    background: transparent;
    color: #666666;
    border: 2px solid #666666;
}

.btn-outline:hover {
    background: #1a1a1a;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.2);
}



/* User Dropdown Styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-avatar-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.user-avatar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 26, 26, 0.3);
}

.user-avatar-initials {
    width: 40px;
    height: 40px;
    background: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

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

.dropdown-item:hover {
    background-color: #f8fafc;
}

.dropdown-icon {
    font-size: 16px;
}

/* User Plan Info Section */
.user-plan-info {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px 24px;
    margin: 20px auto;
    text-align: center;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.plan-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.plan-status {
    font-size: 0.9rem;
    color: #666666;
}

/* Home Page Styles */
.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    width: 80%;
    margin: 0 auto;
    text-align: center;
}

.ai-icon {
    width: 80px;
    height: 80px;
    background: #1a1a1a;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(26, 26, 26, 0.3);
    font-size: 2rem;
    color: white;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 40px;
    margin-bottom: 60px;
    line-height: 1.2;
}

.main-subtitle {
    font-size: 2rem;
    color: #666666;
    margin-bottom: 80px;
    max-width: 600px;
    line-height: 1.6;
}



.hero-spacing {
    height: 40px;
    margin-bottom: 80px;
    position: relative;
}

.hero-spacing::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 1px;
}

/* Features Section */
.features-section {
    margin-bottom: 80px;
    text-align: center;
    scroll-margin-top: 100px;
}

.features-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 100px;
}

.features-flow {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.feature-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    text-align: left;
    padding: 0 20px;
    position: relative;
}

.feature-item.feature-right {
    grid-template-areas: "content image";
}

.feature-item.feature-left {
    grid-template-areas: "image content";
}

.feature-image {
    grid-area: image;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-image img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-image img:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.feature-content {
    grid-area: content;
    max-width: 500px;
}



.feature-icon {
    font-size: 2.5rem;
    filter: grayscale(100%);
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
}

.feature-heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.feature-description {
    font-size: 1.25rem;
    color: #64748b;
    line-height: 1.6;
}

/* Pricing Section */
.pricing-section {
    margin-bottom: 40px;
    scroll-margin-top: 100px;
}

.pricing-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 100px;
}



.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 60px;
}

/* Responsive breakpoints for pricing grid */
@media (max-width: 1200px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
    
    .features-flow {
        gap: 60px;
    }
}

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .features-flow {
        gap: 48px;
    }
    
    .feature-item {
        grid-template-columns: 1fr;
        grid-template-areas: "image" "content";
        gap: 24px;
        text-align: center;
    }
    
    .feature-item.feature-right {
        grid-template-areas: "image" "content";
    }
    
    .feature-item.feature-left {
        grid-template-areas: "image" "content";
    }
    
    .feature-image img {
        max-width: 300px;
    }
    
    .feature-content {
        max-width: 100%;
    }
    

    
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .features-title,
    .pricing-title {
        font-size: 1.75rem;
        margin-bottom: 32px;
    }
    
    .header-nav {
        display: none;
    }
    

}

.pricing-card {
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 400px;
    position: relative;
}

.pricing-card.featured {
    border-color: #1a1a1a;
    box-shadow: 0 8px 25px rgba(26, 26, 26, 0.15);
    transform: scale(1.02);
}

.pricing-card.custom {
    border-color: #666666;
    background: #f9f9f9;
    position: relative;
}

.pricing-card.custom::before {
    content: "Enterprise";
    position: absolute;
    top: -12px;
    left: 20px;
    background: #666666;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 102, 102, 0.3);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #1a1a1a;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.3);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: #1a1a1a;
    background: #fafafa;
}

.pricing-header {
    text-align: center;
    margin-bottom: 20px;
}

.pricing-icon {
    width: 60px;
    height: 60px;
    background: #1a1a1a;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
}

.price {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 8px 0;
}

.price-period {
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
}

.pricing-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.pricing-card p {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    flex-grow: 1;
}

.pricing-card li {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.pricing-card li:before {
    content: "•";
    color: #1a1a1a;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

.pricing-btn {
    margin-top: auto;
    margin-bottom: 20px;
    width: 100%;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Current Plan Highlighting */
.pricing-card.current-plan {
    border-color: #1a1a1a;
    box-shadow: 0 8px 25px rgba(26, 26, 26, 0.15);
    transform: scale(1.02);
    background: #fafafa;
}

.current-plan-banner {
    position: absolute;
    top: -12px;
    left: 20px;
    background: #1a1a1a;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.3);
    z-index: 10;
}

/* CTA Section - replaces main form */
.cta-section {
    text-align: center;
    margin: 40px 0;
}

.cta-subtitle {
    color: #64748b;
    margin-top: 16px;
    font-size: 1rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    min-height: 56px;
}

/* Search Phrases Page Styles */
.main-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 40px;
}

.query-input-section {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
}

.query-input-section .form-input {
    width: 100%;
}

.add-query-btn {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.add-query-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 26, 26, 0.3);
}

.add-query-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.query-limit-info {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.query-count {
    font-weight: 600;
    color: #1a1a1a;
}

.queries-container {
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    min-height: 300px;
}

.sample-queries {
    margin-bottom: 24px;
}

.divider {
    height: 1px;
    background: #e2e8f0;
    margin: 20px 0;
}

.user-queries {
    min-height: 150px;
}

.query-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.query-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px 16px;
    color: #1a1a1a;
}

.query-text {
    flex: 1;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.query-text:hover {
    background-color: rgba(26, 26, 26, 0.1);
}

.query-edit-input {
    width: 100%;
    font-size: 0.95rem;
    padding: 4px 8px;
    border: 2px solid #666666;
    border-radius: 4px;
    background: white;
    color: #1a1a1a;
    outline: none;
    font-family: inherit;
}

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

.sample-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    min-height: 60px;
}

.suggestion-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-bubble:hover {
    background: #e2e8f0;
    border-color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26, 26, 26, 0.1);
}

.suggestion-bubble.used {
    opacity: 0.5;
    pointer-events: none;
    background: #f1f5f9;
}

.loading-container {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    flex-direction: column;
    gap: 12px;
}

.loading-container.active {
    display: flex;
}

.loading-text {
    color: #64748b;
    font-size: 0.9rem;
}

.error-container {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    color: #dc2626;
    font-size: 0.9rem;
    text-align: center;
}

.error-container.active {
    display: flex;
}

.empty-state {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    padding: 40px 20px;
}

.analyze-button {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(26, 26, 26, 0.3);
    display: block;
    margin: 0 auto;
}

.analyze-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(26, 26, 26, 0.4);
}

.analyze-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.limit-reached-message {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-top: 8px;
    display: none;
}

/* Profile Page Styles */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
    padding: 32px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.profile-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: 700;
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.profile-email {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 16px;
}

.profile-joined {
    font-size: 0.9rem;
    color: #9ca3af;
}

.plan-section {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.plan-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    border: 2px solid #e2e8f0;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
}

.plan-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.plan-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.detail-value {
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 600;
}

.upgrade-button {
    background: #1a1a1a;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.upgrade-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 26, 26, 0.3);
}

.history-section {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.query-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.query-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.query-website {
    font-weight: 600;
    color: #1a1a1a;
}

.query-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.query-phrase {
    color: #374151;
    margin-bottom: 8px;
}

.query-type {
    display: inline-block;
    background: #e5e7eb;
    color: #374151;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.no-history {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 40px;
}

/* Report Page Styles */
.report-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 40px 40px;
}

.report-placeholder {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    color: #64748b;
}

.report-placeholder h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.report-placeholder p {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

/* Report Page Analysis Styles */
.analysis-header {
    text-align: center;
    margin-bottom: 40px;
}

.analysis-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.analysis-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 900px;
    margin: 0 auto;
}

.analysis-summary {
    background: #f8fafc;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.overall-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}



.overall-rank-text {
    text-align: left;
}

.overall-rank-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}

.overall-rank-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.stat-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
}

.queries-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 24px;
    text-align: center;
}

.query-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.query-card.loading {
    border-color: #e2e8f0;
    background: white;
}

.query-card.complete {
    border-color: #10b981;
}

.query-card.error {
    border-color: #ef4444;
}

.query-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.query-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
    margin-right: 16px;
}

.query-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.query-rank-section {
    margin-bottom: 20px;
}

.rank-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: space-between;
}

.rank-label {
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
}

.position-badge {
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
}

.position-badge.rank-1 {
    background: #F59E0B; /* Gold */
}

.position-badge.rank-2 {
    background: #94A3B8; /* Silver */
}

.position-badge.rank-3 {
    background: #D97706; /* Bronze */
}

.position-badge.rank-4-10 {
    background: #6B7280; /* Gray */
}

.position-badge.not-found {
    background: #EF4444; /* Red */
}

.search-results {
    margin: 20px 0;
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
}

.results-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.result-item.highlighted {
    background: #f1f5f9;
    border-color: #666666;
    border-width: 2px;
}

.result-number {
    min-width: 30px;
    height: 30px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #64748b;
    font-size: 0.9rem;
}

.result-item.highlighted .result-number {
    background: #666666;
    color: white;
}

.result-content {
    flex: 1;
}

.result-name {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.result-description {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.4;
}

.recommendations {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    min-height: 100px;
}

.recommendations-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recommendations-text {
    color: #475569;
    line-height: 1.5;
    font-size: 0.9rem;
}

.recommendations-text ul {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.recommendations-text li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.recommendations-text li:before {
    content: "•";
    color: #1a1a1a;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.8rem;
}

.recommendations-text p {
    margin-bottom: 12px;
}

.recommendations-text strong {
    color: #1a1a1a;
    font-weight: 600;
}

.recommendations-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-style: italic;
}

.loading-placeholder {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-style: italic;
}

.error-placeholder {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #dc2626;
}

.retry-btn {
    background: #666666;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 8px;
}

.retry-btn:hover {
    background: #1a1a1a;
}

.export-section {
    text-align: center;
    padding: 40px 20px;
    border-top: 2px solid #e2e8f0;
}

.export-btn {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(26, 26, 26, 0.3);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(26, 26, 26, 0.4);
}

.export-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Website Heading - H1 above website indicator */
.website-heading {
    text-align: left;
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    max-width: none;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Website Input Section - replaces website indicator */
.website-input-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 0 auto 20px auto;
    text-align: center;
    max-width: 600px;
}

.website-input-container {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.website-input {
    flex: 1;
    max-width: 300px;
    font-size: 1rem;
    padding: 12px 16px;
}

.add-website-btn {
    white-space: nowrap;
    padding: 12px 20px;
}

.website-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.website-display .website-name {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
}

.change-website-btn {
    background: none;
    border: none;
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.change-website-btn:hover {
    background-color: #eff6ff;
}

.no-website-message {
    color: #64748b;
    font-style: italic;
    text-align: center;
    padding: 20px;
    margin: 20px 0;
}

/* Website Indicator - placed below header */
.website-indicator {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0 auto 20px auto;
    text-align: center;
    max-width: 600px;
}

.website-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 4px;
}

.website-name {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* Common Button Styles */
.btn {
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #1a1a1a;
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 26, 26, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.btn-edit {
    background: white;
    color: #1a1a1a;
    border: 2px solid #e2e8f0;
}

.btn-edit:hover {
    background: #f8fafc;
    border-color: #1a1a1a;
    transform: scale(1.1);
}

.btn-save {
    background: white;
    color: #1a1a1a;
    border: 2px solid #e2e8f0;
}

.btn-save:hover {
    background: #f8fafc;
    border-color: #1a1a1a;
    transform: scale(1.1);
}

.btn-cancel {
    background: white;
    color: #666666;
    border: 2px solid #e2e8f0;
}

.btn-cancel:hover {
    background: #f8fafc;
    border-color: #666666;
    transform: scale(1.1);
}

.btn-delete {
    background: white;
    color: #1a1a1a;
    border: 2px solid #e2e8f0;
    font-size: 16px;
}

.btn-delete:hover {
    background: #f8fafc;
    border-color: #1a1a1a;
    transform: scale(1.1);
}

/* Form Elements */
.form-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
    color: #1a1a1a;
}

.form-input:focus {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.1);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #cbd5e1;
}

.form-input-large {
    padding: 18px 24px;
    font-size: 1.1rem;
    border-radius: 16px;
}

/* Loading States */
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #666666;
    animation: spin 1s ease-in-out infinite;
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Container Styles */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px;
}

.container-narrow {
    max-width: 1000px;
}

.container-wide {
    max-width: 1400px;
}

/* Card Styles */
.card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
}

.card-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
}

/* Status and Progress Elements */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-loading {
    background: white;
    color: #64748b;
}

.status-complete {
    background: #d1fae5;
    color: #065f46;
}

.status-error {
    background: #fecaca;
    color: #991b1b;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #1a1a1a;
    transition: width 0.5s ease;
}





/* Message Styles */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.message-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.message-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.message-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1a1a1a;
}

.message-warning {
    background: #fef3c7;
    border: 1px solid #fed7aa;
    color: #92400e;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.hidden { display: none; }
.block { display: block; }

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        padding: 12px 20px;
    }
    
    .logo-link {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 20px;
    }
    
    .card {
        padding: 16px;
    }
    

    
    .user-plan-info {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .profile-container {
        padding: 20px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .plan-details {
        grid-template-columns: 1fr;
    }
    
    .report-container {
        padding: 20px;
    }
    
    .report-placeholder {
        padding: 24px;
    }
    
    .report-placeholder h1 {
        font-size: 1.5rem;
    }
    
    .analysis-title {
        font-size: 2rem;
    }

    .overall-rank {
        flex-direction: column;
        text-align: center;
    }



    .overall-rank-text {
        text-align: center;
    }

    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .query-header {
        flex-direction: column;
        gap: 12px;
    }

    .rank-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 640px) {
    .page-header {
        flex-direction: column;
        gap: 12px;
        padding: 16px 20px;
    }
    
    .logo-text {
        display: none;
    }
    
    .header-left {
        width: 100%;
        justify-content: center;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .auth-buttons {
        justify-content: center;
    }
    

}

/* Login Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 24px 24px 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.close {
    color: #9ca3af;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close:hover {
    color: #6b7280;
}

.login-options {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.email-login-flow {
    padding: 24px;
}

.email-back-button {
    margin-top: 24px;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

/* Google OAuth Tab */
.google-auth-section {
    text-align: center;
}

.google-auth-section p {
    color: #6b7280;
    margin-bottom: 24px;
    font-size: 14px;
}

.login-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.login-option-btn:first-child {
    margin-bottom: 20px;
}

.login-option-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.login-option-btn svg {
    flex-shrink: 0;
}

.login-option-btn.disabled {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    position: relative;
}

.login-option-btn.disabled:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
    box-shadow: none;
}

.coming-soon-badge {
    background: #fbbf24;
    color: #92400e;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Email Tab */
.email-step {
    display: none;
}

.email-step.active {
    display: block;
}

.email-step h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.email-step p {
    color: #6b7280;
    margin-bottom: 24px;
    font-size: 14px;
}

.email-form, .verification-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.verification-input {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
}

.email-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.btn-link {
    background: none;
    border: none;
    color: #6b7280;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: #374151;
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    border: 1px solid #fecaca;
}

/* Loading States */
.btn-loading {
    display: none;
}

/* Responsive Design */
@media (max-width: 640px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 20px 20px 0 20px;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .login-options {
        padding: 24px;
        gap: 16px;
    }
    
    .email-login-flow {
        padding: 20px;
    }
    
    .email-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .btn-link {
        text-align: center;
        padding: 8px;
    }
}

/* Contact Form Styles */
.contact-form {
    padding: 24px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.contact-form .form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background-color: white;
}

.contact-form .form-input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.contact-form textarea.form-input {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.contact-form select.form-input {
    cursor: pointer;
}

.contact-form .btn-primary {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    margin-top: 8px;
}

.success-message {
    background: #f0fdf4;
    color: #166534;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    border: 1px solid #bbf7d0;
}

/* Responsive contact form */
@media (max-width: 640px) {
    .contact-form {
        padding: 20px;
    }
    
    .contact-form .form-group {
        margin-bottom: 16px;
    }
    
    .contact-form .btn-primary {
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* Account Linking Section Styles */
.account-linking-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin: 32px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.account-methods {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

.account-method {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.method-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.method-info p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}



/* Responsive account linking */
@media (max-width: 640px) {
    .account-linking-section {
        padding: 24px;
        margin: 24px 0;
    }
    
    .account-method {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }
    
    .method-info {
        width: 100%;
    }
}

/* Analysis Items Styling */
.analysis-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.issue-section {
    margin-bottom: 12px;
    line-height: 1.6;
}

.issue-section strong {
    color: #1a1a1a;
    font-weight: 600;
}

.issue-section {
    color: #6b7280;
}

.improvement-section strong {
    color: #1a1a1a;
    font-weight: 600;
}

.improvement-section {
    color: #6b7280;
    line-height: 1.6;
}

.recommendations-content {
    margin-top: 16px;
}

.analysis-text {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    overflow-x: auto;
}

/* New Tabbed Layout Styles */
.main-content {
    padding: 24px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.mb-6 {
    margin-bottom: 24px;
}

/* Manage Queries Button */
.manage-queries-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.manage-queries-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 26, 26, 0.3);
}

.btn-icon {
    font-size: 16px;
}

/* Material Icons styling */
.material-icons {
    font-family: 'Material Icons';
    font-size: 24px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
}

/* Ensure Material Icons in buttons are properly sized */
.btn .material-icons {
    font-size: 16px;
}

/* Ensure Material Icons in tabs are properly sized */
.tab-icon .material-icons {
    font-size: 16px;
}

.btn-note {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

/* Tabs Container */
.tabs-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.tabs-list {
    display: flex;
    background: #e8ebf0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: fit-content;
}

.tab-trigger {
    padding: 8px 16px;
    background: #e8ebf0;
    border: none;
    color: #6b7280;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.tab-trigger:hover {
    background: #e8ebf0;
    color: #6b7280;
}

.tab-trigger.active {
    color: #1a1a1a;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tab-icon {
    font-size: 16px;
    filter: grayscale(100%);
}

.tab-content {
    display: none;
    padding: 32px 24px;
}

.tab-content.active {
    display: block;
}

/* Portfolio Summary Cards */
.portfolio-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.summary-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.summary-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-content {
    text-align: center;
}

.card-label {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-value {
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}



/* Queries Performance */
.queries-performance {
    margin-bottom: 32px;
}

.queries-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

/* Query Cards in Overview */
.query-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.query-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.query-card.loading {
    opacity: 0.8;
}

.query-card.complete {
    border-color: #10b981;
}

.query-card.error {
    border-color: #ef4444;
}

.query-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.query-text {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
    margin-right: 16px;
}

.query-status {
    flex-shrink: 0;
}

.rank-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.rank-label {
    color: #6b7280;
    font-weight: 500;
    font-size: 14px;
}

/* Combined Query Container Box */
.query-container-box {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 32px;
    width: 100%;
}

/* Query Selection Header */
.query-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 24px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.query-selector {
    display: flex;
    align-items: center;
    gap: 16px;
}

.query-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.query-dropdown {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    min-width: 280px;
    background: white;
}

.query-metrics {
    display: flex;
    gap: 16px;
}

.metric-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    min-width: 100px;
}

.metric-label {
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

/* Rank styling for single query view - using same colors as overview */
.metric-value.rank-1 {
    background: #F59E0B; /* Gold */
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
}

.metric-value.rank-2 {
    background: #94A3B8; /* Silver */
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
}

.metric-value.rank-3 {
    background: #D97706; /* Bronze */
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
}

.metric-value.rank-4-10 {
    background: #6B7280; /* Gray */
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
}

.metric-value.not-found {
    background: #EF4444; /* Red */
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
}

.metric-value.error {
    background: #EF4444; /* Red for errors */
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
}

/* Query Details Tabs */
.query-details-tabs {
    background: white;
    border: none;
    border-radius: 0;
    overflow: hidden;
    padding: 15px;
}

.detail-tabs-list {
    display: flex;
    background: #e8ebf0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: fit-content;
}

.detail-tab-trigger {
    padding: 8px 16px;
    background: #e8ebf0;
    border: none;
    color: #6b7280;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.detail-tab-trigger:hover {
    background: #e8ebf0;
    color: #6b7280;
}

.detail-tab-trigger.active {
    color: #1a1a1a;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.detail-tab-content {
    display: none;
    padding: 32px;
}

.detail-tab-content.active {
    display: block;
}

/* Results and Suggestions Content */
.results-title,
.suggestions-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.placeholder-text {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 40px;
}

/* Suggestions Grid */
.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.suggestion-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.suggestion-label {
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.suggestion-issue,
.suggestion-improvement {
    margin-bottom: 8px;
    line-height: 1.6;
}

.suggestion-issue strong,
.suggestion-improvement strong {
    color: #1a1a1a;
    font-weight: 600;
}

.suggestion-issue,
.suggestion-improvement {
    color: #6b7280;
}

/* Query Actions */
.query-actions {
    margin-top: 16px;
    text-align: right;
}

.view-details-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}



/* Results and Suggestions Subtitles */
.results-subtitle,
.suggestions-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}



/* No Queries Message */
.no-queries-message {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.no-queries-message p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.add-queries-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.add-queries-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.2);
}

.add-queries-btn .btn-icon {
    display: flex;
    align-items: center;
}

.back-link {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        padding: 20px 24px;
    }
    
    .portfolio-summary {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 16px;
    }
    
    .queries-grid {
        gap: 16px;
    }
    
    .query-selection-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .query-metrics {
        width: 100%;
        justify-content: space-between;
    }
    
    .metric-card {
        flex: 1;
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 16px 20px;
    }
    
    .portfolio-summary {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .queries-grid {
        gap: 16px;
    }
    
    .tabs-list {
        flex-direction: column;
        padding: 2px;
    }
    
    .tab-trigger {
        border-radius: 4px;
        margin-bottom: 2px;
    }
    
    .tab-trigger:last-child {
        margin-bottom: 0;
    }
    
    .tab-trigger.active {
        box-shadow: none;
    }
    
    .query-metrics {
        flex-direction: column;
        gap: 12px;
    }
    
    .metric-card {
        width: 100%;
    }
    
    .detail-tabs-list {
        flex-direction: column;
        padding: 2px;
    }
    
    .detail-tab-trigger {
        border-radius: 4px;
        margin-bottom: 2px;
    }
    
    .detail-tab-trigger:last-child {
        margin-bottom: 0;
    }
    
    .detail-tab-trigger.active {
        box-shadow: none;
    }
}

/* Search Prompts Modal Styles */
.search-prompts-modal {
    max-width: 1200px !important;
    width: 95% !important;
    max-height: 90vh;
    overflow-y: auto;
}

.search-prompts-modal .modal-body {
    padding: 20px;
}

.search-prompts-modal .modal-header {
    padding: 16px 20px 0 20px;
    justify-content: flex-end;
}

.search-prompts-modal .website-input-container {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.search-prompts-modal .website-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.search-prompts-modal .website-input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.search-prompts-modal .website-display {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
    margin-bottom: 16px;
    text-align: center;
}

.search-prompts-modal .modal-website-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1a1a1a;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: fit-content;
}

.search-prompts-modal .modal-website-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 26, 26, 0.3);
}

.search-prompts-modal .modal-website-name {
    font-weight: 600;
    color: white;
    font-size: 1.1rem;
}

.search-prompts-modal .modal-change-website-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.search-prompts-modal .modal-change-website-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.search-prompts-modal .modal-change-website-btn .material-icons {
    font-size: 16px;
}

.search-prompts-modal .queries-container {
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.search-prompts-modal .sample-queries {
    margin-bottom: 16px;
}

.search-prompts-modal .card-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.search-prompts-modal .card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.search-prompts-modal .loading-container {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    flex-direction: column;
    gap: 12px;
}

.search-prompts-modal .loading-container.active {
    display: flex;
}

.search-prompts-modal .loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #1a1a1a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.search-prompts-modal .loading-text {
    color: #666666;
    font-size: 0.9rem;
}

.search-prompts-modal .error-container {
    display: none;
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.9rem;
}

.search-prompts-modal .error-container.active {
    display: block;
}

.search-prompts-modal .sample-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    min-height: 60px;
}

.search-prompts-modal .suggestion-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-prompts-modal .suggestion-bubble:hover {
    background: #e2e8f0;
    border-color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26, 26, 26, 0.1);
}

.search-prompts-modal .suggestion-bubble.used {
    opacity: 0.5;
    pointer-events: none;
    background: #f1f5f9;
}

.search-prompts-modal .divider {
    height: 1px;
    background: #e2e8f0;
    margin: 16px 0;
}

.search-prompts-modal .query-input-section {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.search-prompts-modal .query-input-section .form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.search-prompts-modal .query-input-section .form-input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.search-prompts-modal .add-query-btn {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.search-prompts-modal .add-query-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 26, 26, 0.3);
}

.search-prompts-modal .query-limit-info {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-prompts-modal .query-count {
    font-weight: 600;
    color: #1a1a1a;
}

.search-prompts-modal .limit-reached-message {
    display: none;
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 500;
}

.search-prompts-modal .user-queries {
    min-height: 150px;
}

.search-prompts-modal .query-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-prompts-modal .query-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px 16px;
    color: #1a1a1a;
}

.search-prompts-modal .query-text {
    flex: 1;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.search-prompts-modal .query-text:hover {
    background-color: rgba(26, 26, 26, 0.1);
}

.search-prompts-modal .query-edit-input {
    width: 100%;
    font-size: 0.95rem;
    padding: 4px 8px;
    border: 2px solid #666666;
    border-radius: 4px;
    background: white;
    color: #1a1a1a;
    outline: none;
    font-family: inherit;
}

.search-prompts-modal .query-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-prompts-modal .btn-small {
    padding: 6px 8px;
    font-size: 0.8rem;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-prompts-modal .btn-edit {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.search-prompts-modal .btn-edit:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.search-prompts-modal .btn-save {
    background: #10b981;
    color: white;
    border: 1px solid #059669;
}

.search-prompts-modal .btn-save:hover {
    background: #059669;
}

.search-prompts-modal .btn-delete {
    background: #ef4444;
    color: white;
    border: 1px solid #dc2626;
}

.search-prompts-modal .btn-delete:hover {
    background: #dc2626;
}

.search-prompts-modal .empty-state {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 40px 20px;
}

.search-prompts-modal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.search-prompts-modal .btn-outline {
    background: white;
    color: #374151;
    border: 2px solid #d1d5db;
}

.search-prompts-modal .btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Responsive design for modal */
@media (max-width: 768px) {
    .search-prompts-modal {
        width: 98% !important;
        margin: 2% auto;
        max-height: 96vh;
    }
    
    .search-prompts-modal .modal-body {
        padding: 16px;
    }
    
    .search-prompts-modal .website-input-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-prompts-modal .website-input-container .add-website-btn {
        align-self: stretch;
    }
    
    .search-prompts-modal .queries-container {
        padding: 16px;
    }
    
    .search-prompts-modal .modal-actions {
        flex-direction: column;
    }
    
    .search-prompts-modal .modal-actions .btn {
        width: 100%;
    }
}

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