/* Общие стили */
body {
    background-color: #1a1a1a;
    color: #ffffff;
}

/* Стили для карточек */
.card {
    background-color: #2d2d2d;
    border: 1px solid #404040;
}

.card-body {
    color: #ffffff;
}

/* Стили для таблиц */
.table {
    color: #ffffff;
}

.table-dark {
    background-color: #2d2d2d;
}

.table-dark td, .table-dark th {
    border-color: #404040;
}

/* Стили для кнопок */
.btn-custom {
    background-color: #007bff;
    border-color: #007bff;
    color: #ffffff;
}

.btn-custom:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: #ffffff;
}

/* Стили для форм */
.form-control, .form-select {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #ffffff;
}

.form-control:focus, .form-select:focus {
    background-color: #2d2d2d;
    border-color: #007bff;
    color: #ffffff;
}

/* Стили для модальных окон */
.modal-content {
    background-color: #2d2d2d;
    border: 1px solid #404040;
}

.modal-header {
    border-bottom-color: #404040;
}

.modal-footer {
    border-top-color: #404040;
}

/* Стили для алертов */
.alert {
    background-color: #2d2d2d;
    border-color: #404040;
}

.alert-info {
    color: #17a2b8;
}

.alert-success {
    color: #28a745;
}

.alert-danger {
    color: #dc3545;
}

/* Стили для навигации */
.navbar {
    background-color: #2d2d2d;
    border-bottom: 1px solid #404040;
}

.navbar-dark .navbar-nav .nav-link {
    color: #ffffff;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #007bff;
}

/* Стили для выпадающих списков */
.dropdown-menu {
    background-color: #2d2d2d;
    border-color: #404040;
}

.dropdown-item {
    color: #ffffff;
}

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

/* Search styles */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    padding: 20px;
    background-color: #1a1a1a;
}

.search-wrapper {
    text-align: center;
    width: 100%;
    max-width: 600px;
    position: relative;
}

.search-title {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 600;
}

.search-subtitle {
    font-size: 1.1rem;
    color: #a0a0a0;
    margin-bottom: 2rem;
}

.search-container form {
    width: 100%;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 20px 60px 20px 30px;
    font-size: 18px;
    border: 2px solid #404040;
    border-radius: 50px;
    outline: none;
    transition: border-color 0.3s ease;
    background-color: #2d2d2d;
    color: #ffffff;
}

.search-input:focus {
    border-color: #007bff;
}

.search-input::placeholder {
    color: #808080;
}

.search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #007bff;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background: #0056b3;
}

.search-button i {
    font-size: 20px;
}

/* Search results styles */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 10px;
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-results-list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
    text-align: left;
}

.search-result-item {
    padding: 0;
    margin: 0;
}

.search-result-item a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-left: 3px solid transparent;
    text-align: left;
}

.search-result-item a:hover {
    background-color: #404040;
    color: #ffffff;
    border-left-color: #007bff;
}

.search-result-item .device-info {
    flex: 1;
    text-align: left;
}

.search-result-item .device-name {
    font-weight: 500;
    margin-bottom: 4px;
    color: #ffffff;
    text-align: left;
}

.search-result-item .device-model {
    font-size: 0.9em;
    color: #a0a0a0;
    text-align: left;
}

.search-result-item .device-category {
    font-size: 0.8em;
    color: #808080;
    margin-top: 2px;
    text-align: left;
}

.search-result-item .device-image {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    border-radius: 4px;
    object-fit: cover;
}

.search-result-item .no-results {
    padding: 20px;
    text-align: center;
    color: #808080;
}

/* Scrollbar styles */
.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #505050;
}

@media (max-width: 768px) {
    .search-container {
        min-height: 40vh;
        padding: 15px;
    }
    
    .search-title {
        font-size: 2rem;
    }
    
    .search-subtitle {
        font-size: 1rem;
    }
    
    .search-input {
        padding: 15px 50px 15px 20px;
        font-size: 16px;
    }
    
    .search-button {
        width: 40px;
        height: 40px;
    }
    
    .search-button i {
        font-size: 16px;
    }
}

/* Стили для страницы устройства */
.device-detail-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.device-header {
    text-align: center;
    margin-bottom: 2rem;
}

.device-title {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.device-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Стили для левой колонки с основной моделью */
.main-device-column {
    position: sticky;
    top: 2rem;
}

.device-specs {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Стили для правой колонки с похожими устройствами */
.similar-devices-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.similar-category-group {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #3a3a3a;
}

.similar-category-group:first-child {
    border: 2px solid #4CAF50;
    background: #1a2a1a;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.2);
}

.category-title {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #333;
}

.current-category {
    color: #4CAF50 !important;
    border-bottom-color: #4CAF50 !important;
    font-weight: bold;
    position: relative;
}

.current-category::before {
    content: "★ ";
    color: #4CAF50;
    margin-right: 5px;
}

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

.similar-device-item {
    display: block;
    padding: 1rem;
    background: #2a2a2a;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #3a3a3a;
}

.similar-device-item:hover {
    background: #333;
    transform: translateX(5px);
    border-color: #4CAF50;
}

.similar-device-name {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.similar-device-dimensions {
    color: #4CAF50;
    font-size: 0.9rem;
}

.no-similar-devices {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    color: #666;
}

/* Стили для информации о дисплее */
.display-info {
    background: #2a2a2a !important;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.display-info h3 {
    color: #4CAF50 !important;
    border-bottom: 2px solid #3a3a3a;
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.display-info p {
    font-size: 1.1rem;
    color: #fff;
    margin: 0.5rem 0;
    line-height: 1.5;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 1024px) {
    .device-content-wrapper {
        grid-template-columns: 1fr;
    }

    .main-device-column {
        position: static;
    }
}

@media (max-width: 768px) {
    .device-title {
        font-size: 2rem;
    }

    .category-title {
        font-size: 1.2rem;
    }

    .similar-device-name {
        font-size: 1rem;
    }

    .similar-device-dimensions {
        font-size: 0.8rem;
    }

    .device-specs,
    .similar-category-group {
        padding: 1rem;
    }
}

/* Стили для страницы устройств */
.devices-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.page-title {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 2rem;
    text-align: center;
}

.section-title {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #333;
}

/* Стили для сетки категорий */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-card {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    padding: 1.5rem;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: #4CAF50;
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.2);
}

.category-card.active {
    border-color: #4CAF50;
    background: #2a2a2a;
}

.category-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.device-count {
    font-size: 0.9rem;
    color: #4CAF50;
}

/* Стили для сетки устройств */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.device-card {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    padding: 1.5rem;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.device-card:hover {
    transform: translateY(-5px);
    border-color: #4CAF50;
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.2);
}

.device-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.device-dimensions {
    font-size: 0.9rem;
    color: #4CAF50;
}

/* Сообщения об отсутствии данных */
.no-categories,
.no-devices {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    color: #666;
    margin: 2rem 0;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .categories-grid,
    .devices-grid {
        grid-template-columns: 1fr;
    }

    .category-card,
    .device-card {
        padding: 1rem;
    }
} 