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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f6fa;
}

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-box h1 {
    margin-bottom: 10px;
    color: #333;
}

.login-box p {
    color: #666;
    margin-bottom: 30px;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.3s;
}

.google-btn:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.google-btn img {
    width: 20px;
    height: 20px;
}

.code-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.code-btn:hover {
    background: #5568d3;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.divider span {
    background: white;
    padding: 0 15px;
    position: relative;
    color: #999;
    font-size: 14px;
}

.disclaimer {
    margin-top: 20px;
    font-size: 12px;
    color: #999;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.top-nav {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-logout {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state h2 {
    margin-bottom: 10px;
    color: #333;
}

.empty-state p {
    color: #666;
}

.ebooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.ebook-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.ebook-card:hover {
    transform: translateY(-5px);
}

.ebook-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.ebook-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.ebook-card h3 {
    padding: 15px 20px 10px;
    color: #333;
    font-size: 18px;
}

.ebook-card p {
    padding: 0 20px 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.btn-read {
    display: block;
    margin: 0 20px 20px;
    padding: 12px;
    background: #667eea;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-read:hover {
    background: #5568d3;
}

@media (max-width: 768px) {
    .top-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .ebooks-grid {
        grid-template-columns: 1fr;
    }
}
