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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

html {
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--white);
    color: var(--gray-900);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.api-key-btn {
    padding: 10px 20px;
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
}

.api-key-btn:hover {
    background: var(--gray-200);
    border-color: var(--primary);
}

.api-key-btn.premium-active {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-color: #f59e0b;
    color: white;
}

.nav-menu a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(to bottom, var(--gray-50), var(--white));
    padding: 80px 0 100px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--gray-600);
    margin-bottom: 48px;
    line-height: 1.6;
}

.scan-box {
    margin-bottom: 48px;
}

.scan-type-selector {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
}

.scan-type-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--gray-700);
}

.scan-type-label:hover {
    border-color: var(--primary-light);
    background: var(--gray-50);
}

.scan-type-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.scan-type-label input[type="radio"]:checked + span {
    color: var(--primary);
    font-weight: 600;
}

.scan-type-label:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.scan-mode {
    animation: fadeIn 0.3s ease;
}

.file-upload-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.file-upload-area {
    background: var(--white);
    border: 2px dashed var(--gray-300);
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.file-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.upload-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: var(--gray-600);
}

.selected-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gray-50);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.selected-file.hidden {
    display: none;
}

.selected-file span {
    font-weight: 500;
    color: var(--gray-900);
    word-break: break-all;
    margin-right: 12px;
}

.remove-file {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.remove-file:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.input-wrapper {
    display: flex;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    padding: 8px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(37, 99, 235, 0.1);
}

#urlInput {
    flex: 1;
    padding: 18px 24px;
    font-size: 16px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--gray-900);
}

#urlInput::placeholder {
    color: var(--gray-400);
}

.scan-button {
    padding: 18px 36px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.scan-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.scan-button:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.scan-button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.scan-button:active:not(:disabled) {
    transform: translateY(0);
}

.scan-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 64px;
    margin-top: 48px;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trust-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.trust-label {
    font-size: 14px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* About Section */
.about-section {
    padding: 100px 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    font-size: 42px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-description {
    font-size: 18px;
    color: var(--gray-600);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-text p {
    font-size: 18px;
    color: var(--gray-700);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-image-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    object-fit: cover;
    max-height: 500px;
}

/* Why Section */
.why-section {
    padding: 100px 0;
    background: var(--gray-50);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--white);
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Results Section */
.results-section {
    padding: 80px 0;
    background: var(--white);
    animation: slideUp 0.6s ease;
}

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

.results-header {
    text-align: center;
    margin-bottom: 48px;
}

.favicon-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 64px;
}

.site-favicon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 2px solid var(--gray-200);
    background: var(--white);
    padding: 8px;
    object-fit: contain;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--gray-200);
    background: var(--white);
    padding: 4px;
    object-fit: cover;
}

.app-icon-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--gray-200);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--white);
}

.results-header h2 {
    font-size: 42px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.results-subtitle {
    font-size: 18px;
    color: var(--gray-600);
}

.rating-card {
    background: var(--gray-50);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 48px;
    text-align: center;
    border: 2px solid var(--gray-200);
}

.rating-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.rating-label {
    font-size: 16px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.rating-badge {
    font-size: 36px;
    font-weight: 800;
    padding: 20px 60px;
    border-radius: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
}

.rating-badge.low {
    background: var(--success);
    color: var(--white);
}

.rating-badge.medium {
    background: var(--warning);
    color: var(--white);
}

.rating-badge.high {
    background: var(--danger);
    color: var(--white);
}

.rating-actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.save-image-btn {
    border: none;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.save-image-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.save-image-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.result-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
}

.result-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.result-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.result-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    font-weight: 500;
    color: var(--gray-600);
}

.detail-value {
    font-weight: 600;
    color: var(--gray-900);
    text-align: right;
    word-break: break-word;
}

.detail-value.success {
    color: var(--success);
}

.detail-value.warning {
    color: var(--warning);
}

.detail-value.danger {
    color: var(--danger);
}

.full-width-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
}

.full-width-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.design-card {
    border: 2px solid #b8f7d1;
    background: linear-gradient(135deg, #f0fdf4, #ecfff7);
}

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

.design-subtitle {
    color: var(--gray-600);
    font-size: 14px;
}

.design-score {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-dark);
    background: var(--white);
    padding: 16px 32px;
    border-radius: 14px;
    border: 2px solid var(--primary-light);
    min-width: 140px;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.design-score.good {
    border-color: var(--success);
    color: var(--success);
}

.design-score.medium {
    border-color: var(--warning);
    color: var(--warning);
}

.design-score.danger {
    border-color: var(--danger);
    color: var(--danger);
}

.design-score-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.design-palette {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.palette-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-900);
}

.palette-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.05);
}

.premium-intel-card {
    border: 2px dashed rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, #eef2ff, #f8fbff);
}

.premium-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.premium-card-subtitle {
    color: var(--gray-600);
    margin: 12px 0 20px;
    font-size: 15px;
}

.premium-badge {
    background: var(--primary);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.premium-locked-note {
    background: rgba(37, 99, 235, 0.08);
    border: 1px dashed rgba(37, 99, 235, 0.4);
    padding: 16px;
    border-radius: 12px;
    color: var(--gray-800);
    font-weight: 500;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.unlock-premium-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.unlock-premium-btn:hover {
    opacity: 0.85;
}

.premium-intel-content {
    margin-top: 20px;
}

.intel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.intel-block h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.success-item {
    border-left-color: var(--success);
    background: #f0fdf4;
}

.premium-card-subtitle strong {
    color: var(--primary-dark);
}

.intel-grid .info-item {
    font-size: 13px;
}

.premium-intel-card .info-item {
    background: rgba(255, 255, 255, 0.9);
}

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

.info-item {
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    font-size: 14px;
    color: var(--gray-700);
}

.risk-item {
    border-left-color: var(--danger);
    background: #fef2f2;
}

.risk-item::before {
    content: "⚠️ ";
    margin-right: 8px;
}

/* Error Toast */
.error-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--danger);
    color: var(--white);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.hidden {
    display: none !important;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 32px 0;
    text-align: center;
    margin-top: 80px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 0;
    }

    .nav-container {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 0 16px;
    }

    .nav-menu {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        padding-top: 4px;
    }

    .nav-menu li {
        list-style: none;
    }

    .nav-menu a {
        font-size: 14px;
        font-weight: 600;
    }

    .logo {
        font-size: 22px;
    }

    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 34px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .input-wrapper {
        flex-direction: column;
        padding: 16px;
    }

    .scan-button {
        width: 100%;
        justify-content: center;
    }

    .scan-type-selector {
        flex-direction: column;
    }

    .trust-indicators {
        gap: 24px;
        flex-wrap: wrap;
    }

    .about-content,
    .features-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }

    .rating-card {
        padding: 28px 20px;
    }

    .save-image-btn {
        width: 100%;
    }
    
    .design-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .design-score {
        font-size: 28px;
        padding: 12px 24px;
        min-width: 120px;
        width: 100%;
        max-width: 200px;
    }
    
    .design-subtitle {
        font-size: 13px;
    }
    
    .cleanup-device-selector {
        flex-direction: column;
    }
    
    .device-btn {
        max-width: 100%;
    }
    
    .cleanup-actions {
        flex-direction: column;
    }
    
    .danger-btn,
    .secondary-btn {
        width: 100%;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 2px solid var(--gray-200);
}

.modal-header h2 {
    font-size: 24px;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--gray-400);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.modal-body {
    padding: 24px;
}

.modal-description {
    color: var(--gray-600);
    margin-bottom: 20px;
    line-height: 1.6;
}

.premium-features-list {
    list-style: none;
    margin: 20px 0;
    padding: 0;
}

.premium-features-list li {
    padding: 10px 0;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.premium-features-list li:last-child {
    border-bottom: none;
}

.api-key-input-wrapper {
    display: flex;
    gap: 12px;
    margin: 24px 0;
}

.api-key-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

.api-key-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.api-key-input:disabled {
    background: var(--gray-100);
    cursor: not-allowed;
}

.api-key-submit {
    padding: 14px 28px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.api-key-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.api-key-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
    font-weight: 500;
}

.api-key-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
}

.api-key-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.api-key-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--gray-200);
    text-align: center;
}

.api-key-info a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.api-key-info a:hover {
    text-decoration: underline;
}

.stripe-link-section {
    margin: 24px 0;
    padding: 24px;
    background: var(--gray-50);
    border-radius: 12px;
    border: 2px solid var(--gray-200);
}

.stripe-link-label {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
    font-size: 16px;
}

.stripe-link-button {
    display: inline-block;
    width: 100%;
    padding: 16px 24px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
}

.stripe-link-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.api-key-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid var(--gray-200);
}

.api-key-section-label {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
    font-size: 16px;
}

/* Premium Section */
.premium-section {
    padding: 100px 0;
    background: var(--white);
    color: var(--gray-900);
}

.premium-header {
    text-align: center;
    margin-bottom: 60px;
}

.premium-header .section-title {
    color: var(--gray-900);
    font-size: 48px;
    margin-bottom: 16px;
}

.premium-header .section-description {
    color: var(--gray-600);
    font-size: 20px;
}

.pricing-card {
    background: var(--white);
    border-radius: 24px;
    padding: 48px;
    max-width: 600px;
    margin: 0 auto 60px;
    box-shadow: var(--shadow-xl);
    position: relative;
    color: var(--gray-900);
}

.pricing-badge {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
}

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

.pricing-header h3 {
    font-size: 32px;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.price-amount {
    font-size: 56px;
    font-weight: 700;
    color: var(--primary);
}

.price-period {
    font-size: 18px;
    color: var(--gray-600);
}

.pricing-features {
    list-style: none;
    margin: 40px 0;
    padding: 0;
}

.pricing-features li {
    padding: 16px 0;
    font-size: 18px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li strong {
    color: var(--primary);
}

.stripe-checkout {
    text-align: center;
    margin-top: 40px;
}

.stripe-button {
    width: 100%;
    padding: 20px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 16px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-lg);
}

.stripe-button:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stripe-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.stripe-note {
    margin-top: 16px;
    font-size: 14px;
    color: var(--gray-600);
}

.premium-comparison {
    background: var(--gray-50);
    border-radius: 24px;
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    border: 2px solid var(--gray-200);
}

.premium-comparison h3 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 32px;
    color: var(--gray-900);
}

.comparison-table {
    display: grid;
    gap: 16px;
}

.comparison-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    padding: 16px;
    background: var(--white);
    border-radius: 12px;
    align-items: center;
    border: 1px solid var(--gray-200);
}

.comparison-feature {
    font-weight: 600;
    color: var(--gray-900);
}

.comparison-free {
    text-align: center;
    color: var(--gray-600);
}

.comparison-premium {
    text-align: center;
    color: var(--primary);
    font-weight: 700;
}

@media (max-width: 768px) {
    .comparison-row {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .pricing-card {
        padding: 32px 24px;
    }
    
    .premium-header .section-title {
        font-size: 36px;
    }
    
    .api-key-input-wrapper {
        flex-direction: column;
    }
}

/* Text Scan Analysis Styles */
.text-input-wrapper {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.text-input-container {
    background: var(--white);
    padding: 8px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
}

.text-input-container:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.text-input {
    width: 100%;
    padding: 18px 24px;
    font-size: 16px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--gray-900);
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.text-input::placeholder {
    color: var(--gray-400);
}

.app-icon-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: var(--shadow-md);
}

/* Cleanup Styles */
.cleanup-wrapper {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cleanup-device-selector {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.device-btn {
    padding: 16px 32px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
    color: var(--gray-700);
    flex: 1;
    max-width: 200px;
}

.device-btn:hover {
    border-color: var(--primary-light);
    background: var(--gray-50);
}

.device-btn.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary);
}

.cleanup-info {
    text-align: center;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 12px;
}

.cleanup-info p {
    margin: 8px 0;
    color: var(--gray-700);
}

.cleanup-note {
    font-size: 14px;
    color: var(--warning);
    font-weight: 500;
}

.cleanup-results-card {
    border: 2px solid var(--warning);
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

.cleanup-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

.cleanup-item {
    padding: 16px;
    background: var(--white);
    border-radius: 8px;
    border-left: 4px solid var(--warning);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cleanup-item-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.cleanup-item-info > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.cleanup-item-type {
    padding: 4px 12px;
    background: var(--gray-100);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
}

.cleanup-item-details {
    font-size: 14px;
    color: var(--gray-600);
}

.cleanup-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.danger-btn {
    background: var(--danger);
    color: var(--white);
    border: none;
}

.danger-btn:hover {
    background: #dc2626;
}

.secondary-btn {
    background: var(--gray-200);
    color: var(--gray-700);
    border: none;
}

.secondary-btn:hover {
    background: var(--gray-300);
}

