/* Variáveis globais */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #34A853;
    --accent-color: #FBBC05;
    --danger-color: #EA4335;
    --text-color: #333;
    --text-secondary: #666;
    --text-light: #888;
    --bg-color: #f8f9fa;
    --bg-light: #f5f5f5;
    --bg-white: #fff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.1);
    --header-height: 70px;
    --mobile-nav-height: 60px;
}

/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Layout principal */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Cabeçalho e Menu Horizontal */
header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 700;
    margin-right: 40px;
}

/* Menu Horizontal */
.horizontal-menu {
    display: flex;
    align-items: center;
    height: 100%;
}

.menu-items {
    display: flex;
    list-style: none;
    height: 100%;
}

.menu-item {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 15px;
    color: var(--text-color);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

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

.menu-item.active {
    color: var(--primary-color);
}

.menu-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.menu-item i {
    margin-right: 8px;
    font-size: 16px;
}

/* Menu Mobile */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    height: var(--mobile-nav-height);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.mobile-menu-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    list-style: none;
    padding: 0 10px;
}

.mobile-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 0;
    width: 100%;
    transition: color 0.3s ease, transform 0.2s ease;
}

.mobile-menu-item:active {
    transform: scale(0.95);
}

.mobile-menu-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

.mobile-menu-item span {
    font-size: 12px;
    font-weight: 500;
}

.mobile-menu-item.active {
    color: var(--primary-color);
}

.mobile-menu-item.active i {
    position: relative;
}

.mobile-menu-item.active i::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info .name {
    font-weight: 500;
}

.logout {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-left: 10px;
}

.logout:hover {
    color: var(--danger-color);
}

/* Conteúdo principal */
.main-content {
    flex: 1;
    padding: 20px;
    margin-top: 20px;
}

/* Seções e títulos */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a7bc8;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #2d9348;
}

.add-book-btn {
    padding: 10px 20px;
}

/* Abas */
.tabs-container {
    margin-top: 30px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.tab-content {
    display: none;
}

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

/* Grade de livros */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.book-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.book-cover {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: rgba(0, 0, 0, 0.2);
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
}

.book-completed-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-info {
    padding: 15px;
}

.book-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-progress-text {
    font-size: 12px;
    color: var(--text-light);
}

.book-completed-date {
    font-size: 12px;
    color: var(--text-light);
}

.start-reading-btn {
    margin-top: 10px;
    width: 100%;
}

/* Estado vazio */
.empty-state {
    text-align: center;
    padding: 50px 0;
}

.empty-state i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Busca de livros */
.search-container {
    display: flex;
    margin-bottom: 30px;
    gap: 10px;
}

#search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.book-list {
    list-style: none;
}

.book-item {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.book-content {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.book-item .book-cover {
    width: 100px;
    height: 150px;
    flex-shrink: 0;
}

.book-item .book-info {
    flex: 1;
}

.book-item .book-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.book-item {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 10px;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.add-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-self: flex-end;
}

.add-btn:hover {
    background-color: #3a7bc8;
}

.htmx-indicator {
    display: inline-block;
    margin-left: 10px;
}

.error-message {
    color: var(--danger-color);
    margin-top: 10px;
}

/* Mensagens */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
}

/* Responsividade */
@media (max-width: 768px) {
    .header-container {
        height: auto;
        padding: 15px;
    }
    
    .horizontal-menu {
        display: none;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .main-content {
        padding-bottom: calc(var(--mobile-nav-height) + 20px);
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .book-cover {
        height: 200px;
    }
    
    .book-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .book-item .book-cover {
        width: 120px;
        height: 180px;
        margin-bottom: 15px;
    }
    
    .book-item .book-info {
        width: 100%;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .add-book-btn {
        margin-top: 10px;
        width: 100%;
    }
    
    .tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
} 