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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    overflow-x: hidden;
}

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

/* Заголовок */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 0 0 20px 20px;
}

.header h1 {
    font-size: 24px;
    margin-bottom: 5px;
    font-weight: 700;
}

.header .subtitle {
    font-size: 14px;
    opacity: 0.9;
}

/* Основний вміст */
.main-content {
    padding: 20px;
    min-height: calc(100vh - 200px);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

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

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

/* Пошук */
.search-bar {
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: #667eea;
}

/* Фільтр-кнопки */
.filter-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background-color: #e0e0e0;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn.active {
    background-color: #667eea;
    color: white;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Список компаній */
.companies-list {
    display: grid;
    gap: 15px;
}

.company-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.company-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.company-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
}

.company-info {
    flex: 1;
}

.company-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.company-category {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.company-rating {
    font-size: 14px;
    color: #ffa500;
}

.company-rating .star {
    color: #ffa500;
    margin-right: 2px;
}

.company-arrow {
    align-self: center;
    color: #ccc;
    font-size: 20px;
}

/* Список новин */
.news-list {
    display: grid;
    gap: 15px;
}

.news-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.news-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

.news-date {
    float: right;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    clear: both;
}

.news-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Список порад */
.tips-list {
    display: grid;
    gap: 15px;
}

.tip-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.tip-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.tip-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.tip-badge.category {
    background: #22c55e;
}

.tip-badge.beginner {
    background: #3b82f6;
}

.tip-badge.intermediate {
    background: #f97316;
}

.tip-badge.advanced {
    background: #ef4444;
}

.tip-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tip-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Аналітика */
.analytics-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.analytics-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background-color: #e0e0e0;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.analytics-btn.active {
    background-color: #a855f7;
    color: white;
}

.analytics-content {
    display: grid;
    gap: 15px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.metric-title {
    font-size: 14px;
    color: #999;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.metric-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
}

.metric-change.positive {
    color: #22c55e;
}

.metric-change.negative {
    color: #ef4444;
}

.metric-change .arrow {
    font-size: 12px;
}

.currency-row {
    background: white;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.currency-name {
    font-size: 16px;
    font-weight: 600;
}

.currency-rate {
    font-size: 14px;
    color: #666;
}

.currency-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
}

.trend-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

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

.trend-name {
    font-size: 16px;
    font-weight: 600;
}

.trend-status {
    font-size: 12px;
    color: #a855f7;
    font-weight: 600;
}

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

.trend-fill {
    height: 100%;
    background: linear-gradient(90deg, #a855f7, #7c3aed);
    transition: width 0.3s;
}

.trend-percentage {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* Модальне вікно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: white;
    margin: 40px auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
}

.modal-meta {
    display: flex;
    gap: 10px;
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.modal-section-content {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.modal-info-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
}

.modal-info-icon {
    width: 20px;
    text-align: center;
    color: #667eea;
}

.modal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.modal-stat {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.modal-stat-value {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.modal-stat-label {
    font-size: 12px;
    color: #999;
}

.modal-steps {
    list-style: none;
}

.modal-step {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.modal-step-number {
    min-width: 24px;
    width: 24px;
    height: 24px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.modal-step-text {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Таб-навігація внизу */
.tab-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
    color: #999;
}

.tab-btn.active {
    color: #667eea;
}

.tab-btn .icon {
    font-size: 24px;
}

.tab-btn .label {
    font-size: 11px;
    font-weight: 600;
}

/* Респонсивність */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }

    .modal-stats {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 20px;
    }

    .main-content {
        padding: 15px;
    }
}
