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

[v-cloak] {
    display: none;
}

html, body {
    height: 100%;
    background: #1a1a2e;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 32px;
}

.nav-username {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-left: auto;
}

.nav-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    text-align: center;
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-text {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.nav-link.nav-active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

#app {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 56px;
}

.vue-tinder {
    width: 340px;
    height: 520px;
    position: relative;
}

/* Animation for keyboard swipes */
.vue-tinder .tinder-card.swipe-left {
    animation: swipeLeft 0.25s ease-out forwards !important;
}

.vue-tinder .tinder-card.swipe-right {
    animation: swipeRight 0.25s ease-out forwards !important;
}

@keyframes swipeLeft {
    to {
        transform: translate3d(-150%, 0, 0) rotate(-30deg);
        opacity: 0;
    }
}

@keyframes swipeRight {
    to {
        transform: translate3d(150%, 0, 0) rotate(30deg);
        opacity: 0;
    }
}

.card {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: white;
}

.card-header {
    padding: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a2e;
}

.card-author {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

.card-images {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 16px;
}

.card-image {
    width: 100%;
    padding-bottom: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f5f5f5;
    margin-bottom: 12px;
    border-radius: 8px;
}

.card-image-first {
    padding-bottom: 0;
    height: calc(100% - 16px);
    min-height: 350px;
    flex-shrink: 0;
}

.card-image:last-child {
    margin-bottom: 0;
}

.card-description {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    padding: 16px 0;
    white-space: pre-wrap;
}

.loading, .no-books {
    color: white;
    text-align: center;
}

.no-books h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.no-books p {
    opacity: 0.7;
}

/* Undo button styles */
.undo-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.undo-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.undo-btn:active {
    transform: translateX(-50%) scale(0.95);
}

.undo-btn-center {
    position: static;
    transform: none;
    margin-top: 24px;
}

.undo-btn-center:active {
    transform: scale(0.95);
}

/* Liked books page */
.liked-page {
    display: block;
    padding: 72px 16px 16px;
    overflow-y: auto;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.book-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease;
}

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

.book-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #f5f5f5;
}

.book-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e5e5;
    color: #999;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-info {
    padding: 12px;
}

.book-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Compact table for disliked books */
.books-table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.books-table th,
.books-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.books-table th {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.books-table td {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}

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

.books-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.books-table a {
    color: white;
    text-decoration: none;
}

.books-table a:hover {
    text-decoration: underline;
}

/* Settings Section */
.settings-section {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.settings-toggle {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.filter-badge {
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.settings-panel {
    position: absolute;
    bottom: 50px;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
    min-width: 180px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.filter-group {
    padding: 8px 4px;
}

.filter-group:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    transition: color 0.2s ease;
}

.filter-label:hover {
    color: white;
}

.filter-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.filter-label span {
    flex: 1;
}

/* Keyboard Shortcuts */
.keyboard-shortcuts {
    position: fixed;
    bottom: 16px;
    left: 16px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    z-index: 100;
}

.keyboard-shortcuts span {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 2px;
    font-family: monospace;
}
