/* modules/css/index.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    color: #ffffff;
    min-height: 100vh;
}

#app {
    max-width: 400px;
    margin: 0 auto;
    background: #121212;
    min-height: 100vh;
    position: relative;
}

.app-container {
    padding-bottom: 140px;
}

/* Шапка */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
}

.header-infinity {
    width: 30px;
    height: 30px;
    fill: #ffffff;
}

.header-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Основной контент */
.main-content {
    padding: 0 20px;
    min-height: calc(100vh - 140px);
}

.view {
    animation: fadeIn 0.3s ease;
    min-height: 60vh;
}

/* Полноэкранный плеер */
.fullscreen-player {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    padding: 40px 20px 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.player-fullscreen .header,
.player-fullscreen .main-content,
.player-fullscreen .mini-player,
.player-fullscreen .bottom-nav {
    display: none;
}

.fullscreen-player .player-header {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.fullscreen-player .back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.fullscreen-player .album-art {
    width: 300px;
    height: 300px;
    margin: 0 auto 40px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.fullscreen-player .album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fullscreen-player .track-details {
    text-align: center;
    margin-bottom: 40px;
}

.fullscreen-player .track-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.fullscreen-player .artist-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
}

.fullscreen-player .progress-section {
    margin-bottom: 40px;
}

.fullscreen-player .progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 15px;
}

.fullscreen-player .progress {
    height: 100%;
    background: #ffffff;
    border-radius: 3px;
    transition: width 0.1s;
}

.fullscreen-player .time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.fullscreen-player .player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.fullscreen-player .control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.fullscreen-player .control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.fullscreen-player .play-pause-btn {
    background: #ffffff;
    border: none;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    color: #000000;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.fullscreen-player .play-pause-btn:hover {
    transform: scale(1.15);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Сетка треков */
.tracks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.track-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.track-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.track-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.track-image img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.track-card:hover .play-overlay {
    opacity: 1;
}

.track-info h3 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-info p {
    font-size: 0.8rem;
    color: #b3b3b3;
}

/* Поиск */
.search-box {
    position: relative;
    margin: 20px 0;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 25px;
    color: #ffffff;
    font-size: 1rem;
}

.search-box input::placeholder {
    color: #b3b3b3;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #b3b3b3;
}

.search-results {
    margin-top: 20px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.result-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
}

.result-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.result-info p {
    font-size: 0.8rem;
    color: #b3b3b3;
}

.no-results {
    text-align: center;
    color: #b3b3b3;
    margin-top: 40px;
    font-size: 1rem;
}

/* Список треков */
.tracks-list {
    margin-top: 20px;
}

.track-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s;
    margin-bottom: 10px;
}

.track-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.track-item-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
}

.track-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-item-info {
    flex: 1;
}

.track-item-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.track-item-info p {
    font-size: 0.8rem;
    color: #b3b3b3;
}

.track-duration {
    color: #b3b3b3;
    font-size: 0.8rem;
}

/* Плеер */
.player-view {
    padding: 20px;
    border-radius: 20px;
    margin: 10px 0;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.player-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.album-art {
    width: 280px;
    height: 280px;
    margin: 0 auto 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-details {
    text-align: center;
    margin-bottom: 30px;
}

.track-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.artist-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.progress-section {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background: #ffffff;
    border-radius: 2px;
    transition: width 0.1s;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.play-pause-btn {
    background: #ffffff;
    border: none;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    color: #000000;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.play-pause-btn:hover {
    transform: scale(1.1);
}

/* Мини-плеер */
.mini-player {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    background: rgba(40, 40, 40, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-player-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.mini-image {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
}

.mini-details h4 {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.mini-details p {
    font-size: 0.8rem;
    color: #b3b3b3;
}

.mini-play-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
}

/* Нижнее меню */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item {
    background: none;
    border: none;
    color: #b3b3b3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-item.active {
    color: #ffffff;
}

.nav-item span {
    font-size: 0.7rem;
}

/* Аккаунт */
.account-header {
    text-align: center;
    padding: 30px 0;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2rem;
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.account-btn {
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.account-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.account-btn.primary {
    background: #667eea;
    border-color: #667eea;
}

.account-btn.primary:hover {
    background: #5a6fd8;
}

.account-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: #b3b3b3;
}

.favorite-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
    transition: color 0.3s;
}

.favorite-btn.active {
    color: #ff4757;
}

.favorite-btn:hover {
    color: #ff4757;
}

/* Адаптивность */
@media (max-width: 480px) {
    .tracks-grid {
        grid-template-columns: 1fr;
    }
    
    .album-art {
        width: 250px;
        height: 250px;
    }
    
    .header-title {
        font-size: 1.3rem;
    }
    
    .header-infinity {
        width: 28px;
        height: 28px;
    }
}

/* Эффекты загрузки */
.form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Плавное появление формы */
.form {
    animation: formAppear 0.5s ease;
}

@keyframes formAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность для полноэкранного плеера */
@media (max-width: 480px) {
    .fullscreen-player {
        padding: 30px 20px 60px;
    }
    
    .fullscreen-player .album-art {
        width: 250px;
        height: 250px;
    }
    
    .fullscreen-player .track-title {
        font-size: 1.5rem;
    }
    
    .fullscreen-player .artist-name {
        font-size: 1.1rem;
    }
    
    .fullscreen-player .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .fullscreen-player .play-pause-btn {
        width: 70px;
        height: 70px;
        font-size: 1.7rem;
    }
}