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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    min-height: 100vh;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo h1 {
    color: #f1f5f9;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.6);
}

.logo h1 a {
    color: #f1f5f9;
    text-decoration: none;
}

.logo p {
    color: #cbd5e1;
    font-size: 1.2rem;
    font-weight: 300;
}

/* Search Container */
.search-container {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.search-form h2 {
    text-align: center;
    color: #f1f5f9;
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Search Input */
.search-input-wrapper {
    position: relative;
}

.search-input-wrapper input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid #475569;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    background: #334155;
    color: #f1f5f9;
}

.search-input-wrapper input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.search-input-wrapper input::placeholder {
    color: #94a3b8;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(51, 65, 85, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid #475569;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    border-bottom: 1px solid #475569;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: rgba(71, 85, 105, 0.5);
}

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

.result-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 1rem;
    object-fit: cover;
}

.result-info {
    flex: 1;
}

.result-name {
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.25rem;
}

.result-developer {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Select */
select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #475569;
    border-radius: 12px;
    font-size: 1rem;
    background: #334155;
    color: #f1f5f9;
    cursor: pointer;
    transition: border-color 0.3s;
    outline: none;
}

select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

select option {
    background: #334155;
    color: #f1f5f9;
}

/* Country Input */
.country-input-wrapper {
    position: relative;
}

.country-input-wrapper input[type="text"] {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid #475569;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    background: #334155;
    color: #f1f5f9;
    cursor: pointer;
}

.country-input-wrapper input[type="text"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    cursor: text;
}

.country-input-wrapper input[type="text"]::placeholder {
    color: #94a3b8;
}

.country-dropdown-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: transform 0.3s ease;
}

/*.country-input-wrapper.open .country-dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}*/

.platform-input-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.platform-input-wrapper select {
  width: 100%;
  padding-right: 25px; /* место под стрелочку */
  appearance: none;    /* убираем стандартную стрелку */
  -webkit-appearance: none;
  -moz-appearance: none;
}

.platform-input-wrapper .dropdown-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.platform-input-wrapper.open .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Country Results */
.country-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(51, 65, 85, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid #475569;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.country-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #475569;
    transition: background 0.2s;
}

.country-result-item:hover {
    background: rgba(71, 85, 105, 0.5);
}

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

.country-flag {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.country-name {
    color: #f1f5f9;
    font-weight: 500;
}

/* Button */
.analyze-btn {
    width: 100%;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-top: 1rem;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.analyze-btn:disabled {
    background: #475569;
    cursor: not-allowed;
    transform: none;
}

/* Features */
.features {
    margin-top: 3rem;
    text-align: center;
}

.features h3 {
    color: #f1f5f9;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background: rgba(51, 65, 85, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    transition: transform 0.3s;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h4 {
    color: #f1f5f9;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-card p {
    color: #cbd5e1;
    font-size: 0.95rem;
}

/* Analysis Page */
.analysis-container {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Loading */
.loading-screen {
    padding: 4rem;
    text-align: center;
}

.loader p {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: #f1f5f9;
}

.loader small {
    color: #cbd5e1;
    font-size: 0.9rem;
}

/* App Info */
.app-info {
    padding: 2rem;
    border-bottom: 1px solid #475569;
}

.app-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin-right: 1.5rem;
    object-fit: cover;
}

.app-details h2 {
    color: #f1f5f9;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.developer {
    color: #cbd5e1;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.app-meta {
    display: flex;
    gap: 1rem;
}

.rating {
    color: #f39c12;
    font-weight: 600;
}

.reviews, .downloads {
    color: #cbd5e1;
    font-size: 0.9rem;
}

.app-description {
    color: #cbd5e1;
    line-height: 1.6;
    margin-top: 1rem;
}

/* Keywords Section */
.keywords-section {
    padding: 2rem;
    border-bottom: 1px solid #475569;
}

.keywords-section h3 {
    color: #f1f5f9;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.keywords-container {
    background: rgba(51, 65, 85, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.keywords-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.2);
    font-weight: 600;
    color: #f1f5f9;
    font-size: 0.9rem;
}

.keyword-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #475569;
    align-items: center;
}

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

.keyword-text {
    font-weight: 500;
    color: #f1f5f9;
}

.search-volume {
    color: #27ae60;
    font-weight: 600;
}

.difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.difficulty.low {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.difficulty.medium {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.difficulty.high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.position {
    font-weight: 600;
    color: #cbd5e1;
}

/* Competitors */
.competitors-section, .secondary-competitors-section {
    padding: 2rem;
    border-bottom: 1px solid #475569;
}

.competitors-section:last-of-type, .secondary-competitors-section:last-of-type {
    border-bottom: none;
}

.competitors-section h3, .secondary-competitors-section h3 {
    color: #f1f5f9;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

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

.competitor-card {
    background: rgba(51, 65, 85, 0.6);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.competitor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.competitor-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.competitor-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    margin-right: 1rem;
    object-fit: cover;
}

.competitor-info h4 {
    color: #f1f5f9;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.competitor-developer {
    color: #cbd5e1;
    font-size: 0.9rem;
}

.competitor-keywords {
    margin-top: 1rem;
}

.competitor-keywords h5 {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.keywords-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-tag {
    background: rgba(71, 85, 105, 0.8);
    color: #cbd5e1;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Action Buttons */
.action-buttons {
    padding: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

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

.btn-secondary {
    background: rgba(51, 65, 85, 0.8);
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.btn-secondary:hover {
    background: #3b82f6;
    color: white;
}

/* Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(148, 163, 184, 0.3);
    border-radius: 50%;
    border-top-color: #f1f5f9;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
}

.spinner.large {
    width: 48px;
    height: 48px;
    border-width: 4px;
    border-color: rgba(59, 130, 246, 0.3);
    border-top-color: #3b82f6;
}

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

/* Utilities */
.hidden {
    display: none !important;
}

/* Back Button */
.back-button {
    background: rgba(51, 65, 85, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid #475569;
    color: #f1f5f9;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 2rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-button:hover {
    background: rgba(71, 85, 105, 0.9);
    border-color: #64748b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.back-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}



/* App Info Header */
.app-info-header {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.app-platform {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.app-platform span {
    margin-right: 0.5rem;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.stat-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-header h3 {
    color: #f1f5f9;
    font-size: 1.1rem;
    margin: 0;
}

.stat-icon {
    font-size: 1.2rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #3b82f6;
    margin: 0.5rem 0;
}

.stat-comparison {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-diff {
    font-size: 0.9rem;
    font-weight: 600;
}

.stat-diff.positive {
    color: #22c55e;
}

.stat-diff.negative {
    color: #ef4444;
}

.stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.left-column, .right-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Keywords Overview */
.keywords-overview {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.keywords-overview h2 {
    color: #f1f5f9;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.keywords-summary {
    background: rgba(59, 130, 246, 0.2);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.summary-value {
    font-size: 2rem;
    font-weight: bold;
    color: #3b82f6;
    margin: 0;
}

.summary-label {
    color: #93c5fd;
    font-size: 0.9rem;
    margin: 0.25rem 0 0 0;
}

.keywords-list .keyword-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(51, 65, 85, 0.6);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.keyword-item .keyword-text {
    color: #f1f5f9;
    font-weight: 500;
}

.keyword-item .keyword-volume {
    color: #cbd5e1;
    font-size: 0.9rem;
}

/* App Details Section */
.app-details-section {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.app-details-section h2 {
    color: #f1f5f9;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.app-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    background: rgba(51, 65, 85, 0.6);
    padding: 1rem;
    border-radius: 8px;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0 0 0.25rem 0;
}

.info-value {
    color: #f1f5f9;
    font-weight: 500;
    margin: 0;
}

.rating-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f1f5f9;
}

.rating-reviews {
    color: #94a3b8;
    font-size: 0.9rem;
}

.info-description {
    color: #cbd5e1;
    line-height: 1.5;
    margin: 0;
}

/* Competitors Analysis */
.competitors-analysis {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.competitors-analysis h2 {
    color: #f1f5f9;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.competitors-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.competitor-item {
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 1rem;
    background: rgba(51, 65, 85, 0.4);
}

.competitor-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.competitor-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.competitor-info h3 {
    color: #f1f5f9;
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
}

.competitor-platform {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.keywords-progress {
    margin-bottom: 1rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.progress-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

.progress-value {
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.9rem;
}

.progress-bar {
    height: 8px;
    background: #475569;
    border-radius: 4px;
    overflow: hidden;
}

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

.competitor-keywords {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.competitor-keyword {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(71, 85, 105, 0.6);
    border-radius: 4px;
    font-size: 0.9rem;
}

.competitor-keyword-term {
    color: #f1f5f9;
}

.competitor-keyword-volume {
    color: #94a3b8;
}

/* Competitor Metrics */
.competitor-metrics {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.competitor-metrics h2 {
    color: #f1f5f9;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

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

.metrics-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metrics-card {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: rgba(51, 65, 85, 0.6);
    border: 1px solid #475569;
    border-radius: 8px;
    transition: background 0.2s;
}

.metrics-card:hover {
    background: rgba(71, 85, 105, 0.6);
}

.metrics-card.level-0 {
    background: rgba(30, 41, 59, 0.8);
    border-color: #3b82f6;
}

.metrics-card.level-1 {
    margin-left: 1rem;
    background: rgba(51, 65, 85, 0.6);
}

.metrics-card.level-2 {
    margin-left: 2rem;
    background: rgba(71, 85, 105, 0.6);
}

.metrics-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    margin-right: 0.75rem;
    object-fit: cover;
}

.metrics-card.level-1 .metrics-card-icon {
    width: 28px;
    height: 28px;
}

.metrics-card.level-2 .metrics-card-icon {
    width: 24px;
    height: 24px;
}

.metrics-card-info {
    flex: 1;
    min-width: 0;
}

.metrics-card-name {
    color: #f1f5f9;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metrics-card.level-1 .metrics-card-name,
.metrics-card.level-2 .metrics-card-name {
    font-size: 0.8rem;
}

.metrics-card-platform {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.platform-icon {
    width: 14px;
    height: 14px;
    margin-right: 5px;
}

.platform-text {
    color: #94a3b8;
    font-size: 0.8rem;
}

/* Competitor Comparison */
.competitor-comparison {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.competitor-comparison h2 {
    color: #f1f5f9;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.table-container {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
    color: #cbd5e1;
    border-bottom: 1px solid #475569;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #334155;
}

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

.comparison-table tr.average-row {
    background: rgba(51, 65, 85, 0.6);
    font-weight: 600;
}

.table-app-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-app-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

.table-app-details h4 {
    color: #f1f5f9;
    font-size: 0.95rem;
    margin: 0 0 0.25rem 0;
}

.table-app-platform {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

.table-metric {
    display: flex;
    flex-direction: column;
}

.metric-value {
    color: #f1f5f9;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.metric-diff {
    font-size: 0.8rem;
}

.metric-diff.positive {
    color: #ef4444;
}

.metric-diff.negative {
    color: #22c55e;
}

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

.comparison-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.comparison-bar-fill.positive {
    background: #ef4444;
}

.comparison-bar-fill.negative {
    background: #22c55e;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .search-container {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        flex-direction: column;
        text-align: center;
    }
    
    .app-icon {
        margin: 0 0 1rem 0;
    }
    
    .keywords-header, .keyword-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .keywords-header {
        display: none;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .app-info-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-table {
        font-size: 0.8rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem;
    }
}

.platform-icon {
    fill: green; /* цвет иконки */
}
