:root {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --accent-color: #0284c7;
    --accent-hover: #0369a1;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Stars Animation */
.stars, .twinkling {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: -1;
}

.stars {
    background: transparent url('https://raw.githubusercontent.com/robinsonraju/robinsonraju.github.io/main/assets/stars.png') repeat top center;
    opacity: 0.15;
    filter: invert(1);
    z-index: -2;
}

.twinkling {
    background: transparent url('https://raw.githubusercontent.com/robinsonraju/robinsonraju.github.io/main/assets/twinkling.png') repeat top center;
    opacity: 0.15;
    filter: invert(1);
    z-index: -1;
    animation: move-twink-back 200s linear infinite;
}

@keyframes move-twink-back {
    from {background-position: 0 0;}
    to {background-position: -10000px 5000px;}
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.back-link {
    margin-bottom: 2rem;
}

.back-link a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    opacity: 0.7;
}

.back-link a:hover {
    color: var(--accent-color);
    opacity: 1;
}

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

.main-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #0f172a 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.description {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: #475569;
}

/* Glassmorphism Panel Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    padding: 2rem;
}

/* Bookshelf Grid */
.bookshelf {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

/* Book Card Styles */
.book-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.book-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: rgba(2, 132, 199, 0.3);
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    z-index: 1;
}

.book-cover-wrapper {
    width: 100%;
    padding-top: 140%; /* Aspect ratio for books roughly */
    position: relative;
    background-color: #f1f5f9;
    overflow: hidden;
}

.book-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.book-card:hover .book-cover {
    transform: scale(1.05);
}

/* Fallback Cover Styling */
.fallback-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

.fallback-vol {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.fallback-title {
    font-family: var(--font-heading);
    color: #0f172a;
    font-size: 1.5rem;
    font-weight: 700;
}

.book-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    z-index: 2;
}

.book-vol {
    color: var(--accent-color);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.book-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #0f172a;
    line-height: 1.3;
}

.book-amazon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    margin-top: auto;
    transition: all 0.3s ease;
    text-align: center;
}

.book-amazon-link:hover {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 0 15px rgba(2, 132, 199, 0.4);
}

.book-amazon-link::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.book-amazon-link:hover::after {
    transform: translateX(4px);
}

/* Coming Soon Badge */
.coming-soon-badge {
    position: absolute;
    top: 1rem;
    right: -2rem;
    background: #f59e0b;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 2.5rem;
    transform: rotate(45deg);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    pointer-events: none;
}

.book-card.coming-soon {
    opacity: 0.8;
}

.book-card.coming-soon .book-amazon-link {
    border-color: #64748b;
    color: #94a3b8;
    pointer-events: none;
    cursor: not-allowed;
    background: rgba(100, 116, 139, 0.1);
}
.book-card.coming-soon .book-amazon-link::after {
    content: '';
}

.instructions-card {
    text-align: center;
    margin-top: 2rem;
}

.instructions-card h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.instructions-card code {
    background: rgba(0,0,0,0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: #0f172a;
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    .subtitle {
        font-size: 1.2rem;
    }
    .bookshelf {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
}
