/* Critical CSS for above-the-fold content */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Optimize font loading */
@font-face {
    font-family: 'Segoe UI';
    font-display: swap;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 50%, #0f0f0f 100%);
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
}

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

header {
    padding: 2rem 0;
    text-align: center;
    border-bottom: 1px solid #333;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding: 4rem 0;
    align-items: start;
}

.book-cover {
    text-align: center;
}

.book-cover img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

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

.book-info h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.book-info .subtitle {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 2rem;
}

.book-info .description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #ccc;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Amazon Brand Guidelines Compliance
 * Official Amazon Orange: #FF9900
 * Official Amazon Dark Blue: #232F3E
 */
.btn-amazon {
    background: #FF9900;
    color: #232F3E;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #FF9900;
}

.btn-amazon:hover {
    background: #E6890A;
    border-color: #E6890A;
    color: #232F3E;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 153, 0, 0.4);
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #ee5a24, #ff6b6b);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #e0e0e0;
    border: 2px solid #555;
}

.btn-secondary:hover {
    background: #555;
    border-color: #777;
}

.social-links {
    margin-top: 2rem;
}

.social-links h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.social-icons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Facebook Brand Guidelines Compliance
 * Official Facebook Blue: #1877F2 (Primary)
 * Hover state: #166FE5 (Darker shade)
 * Source: Meta Brand Resources
 */
.social-icon.facebook {
    background: #1877F2;
}
.social-icon.facebook:hover {
    background: #166FE5;
    transform: translateY(-3px) scale(1.05);
}

/* Facebook brand compliance - ensure proper icon sizing */
.social-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
/* Twitter/X Brand Guidelines Compliance
 * Official X (Twitter) Black: #000000
 */
.social-icon.twitter {
    background: #000000;
}
.social-icon.twitter:hover {
    background: #1a1a1a;
    transform: translateY(-3px) scale(1.05);
}

/* Instagram Brand Guidelines Compliance
 * Official Instagram Gradient colors
 */
.social-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}
.social-icon.instagram:hover {
    background: linear-gradient(45deg, #e6683c 0%,#dc2743 25%,#cc2366 50%,#bc1888 75%,#8b0a50 100%);
    transform: translateY(-3px) scale(1.05);
}

/* LinkedIn Brand Guidelines Compliance
 * Official LinkedIn Blue: #0A66C2
 */
.social-icon.linkedin {
    background: #0A66C2;
}
.social-icon.linkedin:hover {
    background: #004182;
    transform: translateY(-3px) scale(1.05);
}

/* Goodreads Brand Guidelines Compliance
 * Official Goodreads Brown: #553b08
 */
.social-icon.goodreads {
    background: #553b08;
}
.social-icon.goodreads:hover {
    background: #3d2a06;
    transform: translateY(-3px) scale(1.05);
}

/* Pinterest Brand Guidelines Compliance
 * Official Pinterest Red: #E60023
 */
.social-icon.pinterest {
    background: #E60023;
}
.social-icon.pinterest:hover {
    background: #BD081C;
    transform: translateY(-3px) scale(1.05);
}

/* Breadcrumb Navigation */
.breadcrumb {
    list-style: none;
    display: flex;
    padding: 1rem 0;
    margin: 0;
    font-size: 0.9rem;
    color: #ccc;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    margin: 0 0.5rem;
    color: #666;
}

.breadcrumb a {
    color: #4a9eff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #66b3ff;
    text-decoration: underline;
}

.breadcrumb li:last-child span {
    color: #e0e0e0;
    font-weight: 500;
}

/* Enhanced Footer */
footer {
    margin-top: 4rem;
    border-top: 1px solid #333;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 0 2rem;
}

.footer-section {
    text-align: center;
}

.footer-section h3 {
    color: #4a9eff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #4a9eff;
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid #333;
    color: #999;
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.footer-bottom a {
    color: #4a9eff;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 5% auto;
    border: 1px solid #333;
    border-radius: 10px;
    width: 80%;
    height: 90%;
    max-width: 800px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.modal-header {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #fff;
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: #ccc;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: #333;
    color: #fff;
}

.modal-body {
    padding: 2rem;
    height: calc(100% - 80px);
    overflow-y: auto;
}

.preview-content {
    color: #e0e0e0;
    line-height: 1.8;
    font-size: 1.1rem;
}

.preview-content h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
}

.preview-content h4 {
    color: #fff;
    margin: 2rem 0 1rem 0;
    font-size: 1.3rem;
}

.preview-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.preview-note {
    background: linear-gradient(45deg, #2a2a2a, #1a1a1a);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
    margin-top: 2rem;
    font-style: italic;
    color: #ccc;
}

#email-subscription-form {
    margin: 10px 0;
}

#email-subscription-form form {
    margin: 10px 0;
}

#email-subscription-form input, #email-subscription-form button {
    padding: 15px 10px;
    font-size: 1em;
}

.email-subscription-message {
    display: none;
    padding: 10px;
    color: black;
}

#email-subscription-message-ok {
    background-color: greenyellow;
}

#email-subscription-message-error {
    background-color: lightcoral;
}

#unsubscribe-message {
    margin-top: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .book-info h1 {
        font-size: 2rem;
    }

    .cta-buttons {
        justify-content: center;
    }

    .social-icons {
        justify-content: center;
    }

    /* Mobile Modal Styles - 100% width and height */
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
        border: none;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .modal-body {
        padding: 1rem;
        height: calc(100% - 60px);
    }

    .preview-content {
        font-size: 1rem;
    }

    .preview-content h3 {
        font-size: 1.5rem;
    }

    .preview-content h4 {
        font-size: 1.2rem;
    }
}
