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

body {
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size: 11px;
    line-height: 1.4;
    color: #E6E6FA;
    background: radial-gradient(ellipse at center, #2D1B69 0%, #0F0C29 50%, #24243e 100%);
    background-attachment: fixed;
    margin: 0;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Twinkling stars background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(2px 2px at 20px 30px, #FFFFFF, transparent),
        radial-gradient(2px 2px at 40px 70px, #FFD700, transparent),
        radial-gradient(1px 1px at 90px 40px, #FFFFFF, transparent),
        radial-gradient(1px 1px at 130px 80px, #E6E6FA, transparent),
        radial-gradient(2px 2px at 160px 30px, #FFFFFF, transparent),
        radial-gradient(1px 1px at 200px 60px, #FFD700, transparent),
        radial-gradient(1px 1px at 240px 90px, #FFFFFF, transparent),
        radial-gradient(2px 2px at 280px 20px, #E6E6FA, transparent),
        radial-gradient(1px 1px at 320px 50px, #FFFFFF, transparent),
        radial-gradient(2px 2px at 360px 80px, #FFD700, transparent),
        radial-gradient(1px 1px at 400px 30px, #FFFFFF, transparent),
        radial-gradient(1px 1px at 440px 70px, #E6E6FA, transparent),
        radial-gradient(2px 2px at 480px 40px, #FFFFFF, transparent),
        radial-gradient(1px 1px at 520px 90px, #FFD700, transparent),
        radial-gradient(1px 1px at 560px 20px, #FFFFFF, transparent),
        radial-gradient(2px 2px at 600px 60px, #E6E6FA, transparent),
        radial-gradient(1px 1px at 640px 40px, #FFFFFF, transparent),
        radial-gradient(1px 1px at 680px 80px, #FFD700, transparent),
        radial-gradient(2px 2px at 720px 30px, #FFFFFF, transparent),
        radial-gradient(1px 1px at 760px 70px, #E6E6FA, transparent);
    background-repeat: repeat;
    background-size: 800px 100px;
    animation: twinkle 4s linear infinite;
    z-index: -1;
    opacity: 0.8;
}

/* More stars layer */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(1px 1px at 60px 20px, #FFFFFF, transparent),
        radial-gradient(1px 1px at 100px 60px, #E6E6FA, transparent),
        radial-gradient(2px 2px at 140px 90px, #FFD700, transparent),
        radial-gradient(1px 1px at 180px 30px, #FFFFFF, transparent),
        radial-gradient(1px 1px at 220px 70px, #E6E6FA, transparent),
        radial-gradient(1px 1px at 260px 10px, #FFFFFF, transparent),
        radial-gradient(2px 2px at 300px 50px, #FFD700, transparent),
        radial-gradient(1px 1px at 340px 80px, #FFFFFF, transparent),
        radial-gradient(1px 1px at 380px 40px, #E6E6FA, transparent),
        radial-gradient(1px 1px at 420px 20px, #FFFFFF, transparent),
        radial-gradient(2px 2px at 460px 70px, #FFD700, transparent),
        radial-gradient(1px 1px at 500px 90px, #FFFFFF, transparent),
        radial-gradient(1px 1px at 540px 30px, #E6E6FA, transparent),
        radial-gradient(1px 1px at 580px 60px, #FFFFFF, transparent),
        radial-gradient(2px 2px at 620px 10px, #FFD700, transparent),
        radial-gradient(1px 1px at 660px 50px, #FFFFFF, transparent),
        radial-gradient(1px 1px at 700px 80px, #E6E6FA, transparent),
        radial-gradient(1px 1px at 740px 40px, #FFFFFF, transparent);
    background-repeat: repeat;
    background-size: 800px 100px;
    animation: twinkle 6s linear infinite reverse;
    z-index: -1;
    opacity: 0.6;
}

@keyframes twinkle {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

header {
    background: linear-gradient(135deg, #800080 0%, #4B0082 50%, #8B0000 100%);
    border-bottom: 3px solid #4B0082;
    padding: 15px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.5);
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
    animation: headerShimmer 3s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes headerShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

header h1 {
    font-family: Impact, "Arial Black", Helvetica, sans-serif;
    font-size: 36px;
    font-weight: bold;
    color: #E6E6FA;
    text-shadow: 
        2px 2px 4px #4B0082,
        0 0 10px #8B0000,
        0 0 20px #800080;
    margin-bottom: 10px;
    letter-spacing: 3px;
    position: relative;
    z-index: 2;
}

nav {
    margin-top: 10px;
    position: relative;
    z-index: 2;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

nav li {
    display: inline-block;
}

nav a {
    display: block;
    padding: 8px 18px;
    background: linear-gradient(to bottom, #9370DB, #4B0082);
    color: #E6E6FA;
    text-decoration: none;
    border: 2px outset #9370DB;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px #000000;
    transition: all 0.3s ease;
}

nav a:hover {
    background: linear-gradient(to bottom, #BA55D3, #9370DB);
    border: 2px outset #BA55D3;
    box-shadow: 0 0 10px rgba(186, 85, 211, 0.7);
}

nav a.active {
    background: linear-gradient(to bottom, #4B0082, #2E0052);
    border: 2px inset #4B0082;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

main {
    max-width: 760px;
    margin: 20px auto;
    padding: 0 10px;
}

.page {
    display: none;
    background: linear-gradient(135deg, rgba(128,0,128,0.1), rgba(75,0,130,0.1));
    border: 3px ridge #8B0000;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.page.active {
    display: block;
}

.page h2 {
    font-family: Impact, "Arial Black", Helvetica, sans-serif;
    font-size: 24px;
    color: #E6E6FA;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 2px 2px 4px #4B0082, 0 0 10px #8B0000;
}

#pick-movie-btn {
    background: linear-gradient(to bottom, #8B0000, #A0522D);
    color: #E6E6FA;
    border: 3px outset #8B0000;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    font-family: Verdana, sans-serif;
    text-transform: uppercase;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    text-shadow: 1px 1px 2px #000000;
    transition: all 0.3s ease;
}

#pick-movie-btn:hover {
    background: linear-gradient(to bottom, #CD5C5C, #8B0000);
    border: 3px outset #CD5C5C;
    box-shadow: 0 0 15px rgba(205, 92, 92, 0.7);
    transform: translateY(-2px);
}

#pick-movie-btn:active {
    border: 3px inset #8B0000;
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.5);
    transform: translateY(0);
}

.movie-result {
    margin-top: 20px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(147,112,219,0.2), rgba(75,0,130,0.2));
    border: 2px ridge #9370DB;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 0 15px rgba(147, 112, 219, 0.3);
    backdrop-filter: blur(3px);
}

.movie-result.empty {
    color: #DDA0DD;
    font-style: italic;
}

.movie-result h3 {
    font-family: "Times New Roman", Times, serif;
    font-size: 18px;
    color: #E6E6FA;
    margin-bottom: 5px;
    font-weight: bold;
    text-shadow: 1px 1px 3px #4B0082;
}

.movie-result p {
    color: #DDA0DD;
    font-size: 12px;
    text-shadow: 1px 1px 2px #000000;
}

/* This Week's Movie Box */
.weekly-movie-box {
    background: linear-gradient(135deg, rgba(139,0,0,0.3), rgba(128,0,128,0.3));
    border: 3px ridge #8B0000;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 0 25px rgba(139, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    position: relative;
}

.weekly-movie-box::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #8B0000, #800080, #4B0082, #8B0000);
    border-radius: 5px;
    z-index: -1;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.weekly-movie-box h3 {
    font-family: Impact, "Arial Black", Helvetica, sans-serif;
    color: #E6E6FA;
    font-size: 20px;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 2px 2px 4px #8B0000, 0 0 10px #800080;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.weekly-movie-box .no-selection {
    color: #DDA0DD;
    font-style: italic;
    text-align: center;
    font-size: 12px;
}

.weekly-movie-info {
    text-align: center;
}

.weekly-movie-info h4 {
    font-family: "Times New Roman", Times, serif;
    color: #E6E6FA;
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: bold;
    text-shadow: 1px 1px 3px #4B0082;
}

.weekly-movie-info p {
    color: #DDA0DD;
    margin-bottom: 15px;
    font-size: 11px;
    text-shadow: 1px 1px 2px #000000;
}

#write-about-btn {
    background: linear-gradient(to bottom, #9370DB, #4B0082);
    color: #E6E6FA;
    border: 2px outset #9370DB;
    padding: 10px 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    font-family: Verdana, sans-serif;
    text-transform: uppercase;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    text-shadow: 1px 1px 2px #000000;
    transition: all 0.3s ease;
}

#write-about-btn:hover {
    background: linear-gradient(to bottom, #BA55D3, #9370DB);
    border: 2px outset #BA55D3;
    box-shadow: 0 0 12px rgba(186, 85, 211, 0.7);
}

#write-about-btn:active {
    border: 2px inset #9370DB;
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.4);
}

/* Action Buttons */
.movie-actions {
    margin-top: 18px;
    text-align: center;
}

.action-btn {
    background: linear-gradient(to bottom, #800080, #4B0082);
    color: #E6E6FA;
    border: 2px outset #800080;
    padding: 10px 18px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    margin: 0 8px;
    font-family: Verdana, sans-serif;
    text-transform: uppercase;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
    text-shadow: 1px 1px 2px #000000;
    transition: all 0.3s ease;
}

.action-btn:hover {
    box-shadow: 0 0 12px rgba(128, 0, 128, 0.7);
    transform: translateY(-1px);
}

.action-btn:active {
    border: 2px inset #800080;
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.4);
    transform: translateY(0);
}

.action-btn.primary {
    background: linear-gradient(to bottom, #8B0000, #A0522D);
    border: 2px outset #8B0000;
}

.action-btn.primary:hover {
    background: linear-gradient(to bottom, #CD5C5C, #8B0000);
    border: 2px outset #CD5C5C;
    box-shadow: 0 0 12px rgba(205, 92, 92, 0.7);
}

.action-btn.primary:active {
    border: 2px inset #8B0000;
}

.action-btn.secondary {
    background: linear-gradient(to bottom, #9370DB, #4B0082);
    border: 2px outset #9370DB;
}

.action-btn.secondary:hover {
    background: linear-gradient(to bottom, #BA55D3, #9370DB);
    border: 2px outset #BA55D3;
    box-shadow: 0 0 12px rgba(186, 85, 211, 0.7);
}

.action-btn.secondary:active {
    border: 2px inset #9370DB;
}

/* Blog Posts */
#blog-posts {
    max-width: 100%;
}

.blog-post {
    background: linear-gradient(135deg, rgba(75,0,130,0.2), rgba(139,0,0,0.2));
    border: 2px ridge #4B0082;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 0 15px rgba(75, 0, 130, 0.4);
    backdrop-filter: blur(5px);
}

.blog-post h3 {
    margin-bottom: 8px;
}

.blog-post h3 a {
    color: #E6E6FA;
    text-decoration: underline;
    font-size: 14px;
    font-weight: bold;
    font-family: "Times New Roman", Times, serif;
    text-shadow: 1px 1px 2px #4B0082;
    transition: all 0.3s ease;
}

.blog-post h3 a:hover {
    color: #DDA0DD;
    text-decoration: none;
    text-shadow: 1px 1px 3px #8B0000;
}

.blog-post h3 a:visited {
    color: #BA55D3;
}

.blog-meta {
    color: #DDA0DD;
    font-size: 10px;
    margin-bottom: 12px;
    font-style: italic;
    text-shadow: 1px 1px 1px #000000;
}

.blog-excerpt {
    color: #E6E6FA;
    font-size: 11px;
    line-height: 1.4;
    text-shadow: 1px 1px 1px #000000;
}

.rating-stars {
    color: #FFD700;
    font-size: 14px;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px #000000, 0 0 5px #FFD700;
}

/* Watched Movies */
.watched-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
    align-items: stretch;
}

.watched-movie {
    flex: 1 1 calc(33.333% - 12px);
    min-width: 280px;
    background: linear-gradient(135deg, rgba(147,112,219,0.2), rgba(139,0,0,0.2));
    border: 2px ridge #9370DB;
    padding: 15px;
    box-shadow: 0 0 12px rgba(147, 112, 219, 0.4);
    backdrop-filter: blur(3px);
    box-sizing: border-box;
}

.watched-movie h4 {
    color: #E6E6FA;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: bold;
    font-family: "Times New Roman", Times, serif;
    text-shadow: 1px 1px 2px #4B0082;
}

.watched-movie p {
    color: #DDA0DD;
    font-size: 10px;
    margin-bottom: 6px;
    text-shadow: 1px 1px 1px #000000;
}

.watched-movie .rating {
    color: #FFD700;
    font-size: 12px;
    text-shadow: 1px 1px 2px #000000, 0 0 5px #FFD700;
}

.no-movies {
    text-align: center;
    color: #DDA0DD;
    font-style: italic;
    margin-top: 30px;
    font-size: 12px;
}

/* Modal */
.modal {
    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);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, rgba(75,0,130,0.9), rgba(139,0,0,0.9));
    border: 3px ridge #8B0000;
    padding: 25px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(139, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.modal-content h3 {
    font-family: Impact, "Arial Black", Helvetica, sans-serif;
    color: #E6E6FA;
    font-size: 18px;
    margin-bottom: 18px;
    text-align: center;
    text-shadow: 2px 2px 4px #4B0082;
}

.close {
    position: absolute;
    right: 12px;
    top: 8px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    color: #E6E6FA;
    background: linear-gradient(to bottom, #8B0000, #4B0082);
    border: 2px outset #8B0000;
    width: 25px;
    height: 25px;
    text-align: center;
    line-height: 21px;
    text-shadow: 1px 1px 2px #000000;
    transition: all 0.3s ease;
}

.close:hover {
    background: linear-gradient(to bottom, #CD5C5C, #8B0000);
    box-shadow: 0 0 10px rgba(205, 92, 92, 0.7);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #E6E6FA;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px #4B0082;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 6px;
    border: 2px inset #4B0082;
    font-size: 11px;
    font-family: Verdana, sans-serif;
    background: rgba(230, 230, 250, 0.9);
    color: #4B0082;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    background: rgba(255, 255, 255, 0.95);
    border: 2px inset #8B0000;
    box-shadow: 0 0 8px rgba(139, 0, 0, 0.5);
}

/* Star Rating */
.star-rating {
    text-align: center;
    margin: 12px 0;
}

.star {
    font-size: 22px;
    color: rgba(255, 215, 0, 0.3);
    cursor: pointer;
    text-shadow: 1px 1px 2px #000000;
    margin: 0 3px;
    transition: all 0.3s ease;
}

.star:hover,
.star.active {
    color: #FFD700;
    text-shadow: 1px 1px 2px #000000, 0 0 8px #FFD700;
    transform: scale(1.1);
}

.form-actions {
    text-align: center;
    margin-top: 20px;
}

.form-actions .action-btn {
    margin: 0 8px;
}

/* Scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 16px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(75, 0, 130, 0.3);
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #8B0000, #4B0082);
    border: 1px outset #8B0000;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #CD5C5C, #8B0000);
}

/* Error message styling */
.error-message {
    color: #FF6B6B;
    background-color: rgba(139, 0, 0, 0.2);
    border: 1px solid #FF6B6B;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 11px;
    text-align: center;
}

/* Jonky authentication button */
.jonky-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(to bottom, #4B0082, #2D1B69);
    color: #E6E6FA;
    border: 1px outset #4B0082;
    padding: 8px 12px;
    font-size: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    transition: all 0.2s ease;
    z-index: 100;
}

.jonky-btn:hover {
    background: linear-gradient(to bottom, #6A0DAD, #4B0082);
    border: 1px outset #6A0DAD;
    transform: translateY(-1px);
}

.jonky-btn:active {
    border: 1px inset #4B0082;
    transform: translateY(1px);
}

/* Hidden elements */
.hidden {
    display: none !important;
}

/* Review button */
.review-btn {
    background: linear-gradient(to bottom, #4B0082, #2D1B69);
    color: #E6E6FA;
    border: 1px outset #4B0082;
    padding: 6px 10px;
    font-size: 10px;
    border-radius: 3px;
    cursor: pointer;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.review-btn:hover {
    background: linear-gradient(to bottom, #6A0DAD, #4B0082);
    border: 1px outset #6A0DAD;
}

.review-btn:active {
    border: 1px inset #4B0082;
}

.has-review {
    color: #90EE90;
    font-size: 10px;
    margin-top: 5px;
    font-style: italic;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    body {
        font-size: 10px;
    }
    
    header h1 {
        font-size: 28px;
        letter-spacing: 2px;
    }
    
    nav a {
        padding: 6px 12px;
        font-size: 9px;
    }
    
    main {
        max-width: 100%;
        margin: 15px auto;
        padding: 0 8px;
    }
    
    .page {
        padding: 15px;
    }
    
    .page h2 {
        font-size: 20px;
    }
    
    .movie-actions {
        text-align: center;
    }
    
    .action-btn {
        display: block;
        margin: 8px auto;
        width: 180px;
    }
    
    .watched-grid {
        flex-direction: column;
    }
    
    .watched-movie {
        flex: 1 1 auto;
        min-width: auto;
        margin-bottom: 12px;
    }
    
    .modal-content {
        width: 95%;
        margin: 8px;
        padding: 20px;
    }
    
    #pick-movie-btn {
        padding: 10px 20px;
        font-size: 12px;
    }
}