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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #fafafa;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border: 1px solid #e0e0e0;
}

header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.header-text {
    flex: 1;
}

h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000;
}

h1 a {
    color: inherit;
    text-decoration: none;
}

h1 a:hover {
    color: inherit;
    text-decoration: none;
}

header p {
    color: #666;
    font-size: 16px;
}

.validation-form {
    margin-bottom: 40px;
}

.form-inline {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.form-input-wrapper {
    flex: 1;
}

input[type="url"] {
    width: 100%;
    height: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    font-size: 15px;
    transition: all 0.2s;
    background: #fafafa;
}

input[type="url"]:focus {
    outline: none;
    border-color: #000;
    background: #fff;
}

input[type="url"]::placeholder {
    color: #999;
}

.btn-validate {
    background: #000;
    color: #fff;
    padding: 16px 32px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-validate:hover {
    background: #333;
    transform: translateY(-1px);
}

.btn-validate:active {
    transform: translateY(0);
}

.btn-validate svg {
    flex-shrink: 0;
}

.error-message {
    margin-top: 30px;
    padding: 16px;
    background: #fff5f5;
    border: 1px solid #e53e3e;
    color: #c53030;
}

.results {
    margin-top: 40px;
}

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

.results-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #000;
}

.status-badge {
    padding: 8px 16px;
    border: 1px solid;
    font-weight: 500;
    font-size: 14px;
}

.status-ready {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #15803d;
}

.status-not-ready {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.feed-info {
    margin-bottom: 30px;
    padding: 16px;
    background: #f9f9f9;
    border-left: 3px solid #000;
}

.feed-info p {
    margin-bottom: 4px;
}

.summary {
    margin-bottom: 40px;
}

.summary h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #000;
}

.priority-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.priority-card {
    padding: 24px;
    border: 2px solid;
    background: #fff;
}

.priority-card.critical {
    border-color: #dc2626;
    background: #fef2f2;
}

.priority-card.important {
    border-color: #ea580c;
    background: #fff7ed;
}

.priority-card.optional {
    border-color: #94a3b8;
    background: #f8fafc;
}

.priority-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.priority-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.priority-header h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #000;
}

.priority-subtitle {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.priority-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
    color: #1a1a1a;
}

.valid-number {
    color: #15803d;
}

.missing-number {
    color: #92400e;
}

.invalid-number {
    color: #991b1b;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.total-item {
    border-left: 1px solid #d0d0d0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    margin-bottom: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.required-progress {
    background: #dc2626;
}

.recommended-progress {
    background: #ea580c;
}

.optional-progress {
    background: #64748b;
}

.progress-label {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: right;
}

.stat {
    font-size: 14px;
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
}

.stat.valid {
    background: #f0fdf4;
    border-color: #86efac;
    color: #15803d;
}

.stat.missing {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.stat.invalid {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.stat.total {
    background: #f9f9f9;
    color: #1a1a1a;
}

.detailed-results {
    margin-bottom: 40px;
}

.detailed-results h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #000;
}

.field-group {
    margin-bottom: 32px;
}

.collapsible-section {
    border: 1px solid #e0e0e0;
}

.collapse-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f9f9f9;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.collapse-toggle:hover {
    background: #f0f0f0;
}

.collapse-toggle h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.collapse-icon {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.collapse-toggle.expanded .collapse-icon {
    transform: rotate(0deg);
}

.collapse-toggle:not(.expanded) .collapse-icon {
    transform: rotate(-90deg);
}

.collapse-content {
    padding: 0;
}

.field-table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    border-top: 1px solid #e0e0e0;
}

.field-table th {
    background: #f9f9f9;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
}

.field-table-required th {
    background: #fef2f2;
    border-bottom-color: #fca5a5;
}

.field-table-recommended th {
    background: #fff7ed;
    border-bottom-color: #fdba74;
}

.field-table-optional th {
    background: #f8fafc;
    border-bottom-color: #cbd5e1;
}

.field-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.field-table-required tbody tr {
    background: #fffbfb;
}

.field-table-recommended tbody tr {
    background: #fffcf9;
}

.field-table-optional tbody tr {
    background: #fafbfc;
}

.field-table tr:last-child td {
    border-bottom: none;
}

.field-table code {
    background: #f5f5f5;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #000;
}

.field-table .description {
    color: #666;
    font-size: 13px;
}

.status-label {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid;
}

.status-missing {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.status-invalid {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.valid-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.valid-field-tag {
    padding: 6px 12px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.next-steps {
    padding: 20px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    margin-top: 30px;
}

.next-steps h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #92400e;
}

.next-steps ul {
    margin-left: 20px;
    color: #78350f;
}

.next-steps li {
    margin-bottom: 6px;
}

.optimization-example {
    margin-top: 40px;
    padding: 32px;
    background: #f0fdf4;
    border: 2px solid #22c55e;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.optimization-example h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #15803d;
}

.example-product {
    padding: 16px;
    background: #fff;
    border-left: 3px solid #22c55e;
    margin-bottom: 24px;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
}

.example-product h4 {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
}

.product-id {
    font-size: 13px;
    color: #666;
    font-family: 'Courier New', monospace;
}

.optimization-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
    max-width: 100%;
}

.optimization-section {
    padding: 20px;
    background: #fff;
    border: 1px solid #d0d0d0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.optimization-section h5 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #000;
}

.missing-field-item {
    padding: 12px;
    background: #fef2f2;
    border-left: 2px solid #ef4444;
    margin-bottom: 8px;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
}

.missing-field-item code {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #991b1b;
}

.missing-field-item span {
    font-size: 13px;
    color: #666;
}

.suggestion-item {
    margin-bottom: 20px;
    max-width: 100%;
    box-sizing: border-box;
}

.suggestion-item strong {
    display: block;
    margin-bottom: 8px;
    color: #000;
}

.suggestion-item pre {
    background: #f5f5f5;
    padding: 12px;
    border-left: 2px solid #22c55e;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    margin: 8px 0;
    max-width: 100%;
    box-sizing: border-box;
}

.suggestion-item p {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

.ai-optimization-tips {
    padding: 24px;
    background: #fff;
    border: 1px solid #d0d0d0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.ai-optimization-tips h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #000;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    max-width: 100%;
}

.tip-item {
    padding: 16px;
    background: #fafafa;
    border-left: 2px solid #22c55e;
    max-width: 100%;
    box-sizing: border-box;
}

.tip-item strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #000;
}

.tip-item p {
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 8px;
}

.tip-item pre {
    background: #fff;
    padding: 8px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    border: 1px solid #e0e0e0;
    overflow-x: auto;
    margin-top: 8px;
    max-width: 100%;
    box-sizing: border-box;
}

.tip-item code {
    background: #fff;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    border: 1px solid #e0e0e0;
}

.tip-example {
    margin-top: 8px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    font-size: 12px;
}

.tip-example .label {
    font-weight: 600;
    color: #666;
    display: block;
    margin-bottom: 4px;
}

.info-section {
    margin-top: 60px;
    padding: 32px;
    background: #f9f9f9;
    border-left: 3px solid #000;
}

.info-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #000;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.info-item h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000;
}

.info-item p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.info-item code {
    background: #fff;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #000;
    border: 1px solid #e0e0e0;
}

.info-tip {
    padding: 16px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    font-size: 14px;
    line-height: 1.6;
    color: #78350f;
}

.info-tip strong {
    color: #92400e;
}

.extension-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: #1a2332;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(26, 35, 50, 0.4);
    padding: 24px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.extension-popup.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

.popup-icon {
    margin-bottom: 16px;
}

.popup-icon img {
    width: 48px;
    height: 48px;
    filter: brightness(0) invert(1);
}

.popup-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.popup-content p {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 16px;
    text-align: left;
}

.popup-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.popup-features span {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

.popup-cta {
    display: block;
    width: 100%;
    padding: 12px 24px;
    background: #fff;
    color: #1a2332;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-align: center;
}

.popup-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: #f0f0f0;
}

footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #666;
    font-size: 14px;
}

footer p {
    margin-bottom: 8px;
}

footer a {
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #000;
}

footer a:hover {
    border-bottom-color: #666;
}

.footer-credit {
    font-size: 13px;
    color: #999;
}

.footer-credit a {
    color: #666;
    font-weight: 500;
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    
    .container {
        padding: 16px;
    }
    
    .header-content {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
    }
    
    .header-logo {
        width: 48px;
        height: 48px;
    }
    
    h1 {
        font-size: 22px;
        line-height: 1.3;
    }
    
    header p {
        font-size: 14px;
    }
    
    .form-inline {
        flex-direction: column;
        gap: 12px;
    }
    
    input[type="url"] {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .btn-validate {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .status-badge {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .results-header h2 {
        font-size: 20px;
    }
    
    .feed-info {
        padding: 12px;
        font-size: 14px;
    }
    
    .summary h3 {
        font-size: 18px;
    }
    
    .priority-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .priority-card {
        padding: 16px;
    }
    
    .priority-header h4 {
        font-size: 15px;
    }
    
    .priority-subtitle {
        font-size: 12px;
    }
    
    .priority-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-item:nth-child(4) {
        grid-column: span 2;
        border-left: none;
        border-top: 1px solid #d0d0d0;
        padding-top: 12px;
    }
    
    .detailed-results h3 {
        font-size: 18px;
    }
    
    .collapse-toggle {
        padding: 12px;
    }
    
    .collapse-toggle h4 {
        font-size: 14px;
    }
    
    .field-table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .field-table thead,
    .field-table tbody,
    .field-table tr {
        display: block;
    }
    
    .field-table thead {
        display: none;
    }
    
    .field-table tr {
        margin-bottom: 16px;
        border: 1px solid #e0e0e0;
        padding: 12px;
    }
    
    .field-table td {
        display: block;
        padding: 6px 0;
        border: none;
        text-align: left;
    }
    
    .field-table td:before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 4px;
        color: #666;
        font-size: 11px;
        text-transform: uppercase;
    }
    
    .field-table td code {
        font-size: 12px;
    }
    
    .valid-fields {
        gap: 6px;
    }
    
    .valid-field-tag {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .optimization-example {
        padding: 12px;
        margin-top: 32px;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }
    
    .optimization-example h3 {
        font-size: 18px;
        margin-bottom: 16px;
        word-wrap: break-word;
    }
    
    .example-product {
        padding: 10px;
        margin-bottom: 16px;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .example-product h4 {
        font-size: 14px;
        line-height: 1.4;
        word-wrap: break-word;
    }
    
    .product-id {
        font-size: 11px;
        word-wrap: break-word;
    }
    
    .optimization-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 20px;
        max-width: 100%;
    }
    
    .optimization-section {
        padding: 10px;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .optimization-section h5 {
        font-size: 14px;
        margin-bottom: 10px;
        word-wrap: break-word;
    }
    
    .missing-field-item {
        padding: 8px;
        margin-bottom: 6px;
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
    }
    
    .missing-field-item code {
        font-size: 11px;
        word-break: break-word;
    }
    
    .missing-field-item span {
        font-size: 11px;
        word-wrap: break-word;
    }
    
    .suggestion-item {
        margin-bottom: 14px;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .suggestion-item strong {
        font-size: 12px;
        display: block;
        margin-bottom: 6px;
        word-wrap: break-word;
    }
    
    .suggestion-item pre {
        font-size: 9px;
        padding: 6px;
        overflow-x: auto;
        white-space: pre;
        word-wrap: normal;
        max-width: calc(100vw - 64px);
        box-sizing: border-box;
    }
    
    .suggestion-item p {
        font-size: 11px;
        word-wrap: break-word;
    }
    
    .ai-optimization-tips {
        padding: 10px;
        margin-top: 16px;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .ai-optimization-tips h5 {
        font-size: 15px;
        margin-bottom: 12px;
        word-wrap: break-word;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 100%;
    }
    
    .tip-item {
        padding: 8px;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .tip-item strong {
        font-size: 12px;
        word-wrap: break-word;
    }
    
    .tip-item p {
        font-size: 11px;
        word-wrap: break-word;
    }
    
    .tip-item pre {
        font-size: 9px;
        padding: 6px;
        word-wrap: break-word;
        white-space: pre-wrap;
        max-width: 100%;
        overflow-x: auto;
        box-sizing: border-box;
    }
    
    .tip-item code {
        font-size: 10px;
        word-break: break-word;
    }
    
    .tip-example {
        font-size: 10px;
        padding: 6px;
        word-wrap: break-word;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .info-section {
        padding: 20px 16px;
    }
    
    .info-section h3 {
        font-size: 18px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .info-item h4 {
        font-size: 14px;
    }
    
    .info-item p {
        font-size: 13px;
    }
    
    .info-tip {
        padding: 12px;
        font-size: 13px;
    }
    
    .extension-popup {
        width: calc(100vw - 40px);
        max-width: 320px;
        bottom: 10px;
        right: 10px;
        padding: 20px;
    }
    
    .popup-content h3 {
        font-size: 16px;
    }
    
    .popup-content p {
        font-size: 13px;
    }
    
    .popup-features span {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    footer {
        font-size: 13px;
    }
    
    footer p {
        line-height: 1.6;
    }
    
    .footer-credit {
        font-size: 12px;
    }
}

