:root {
    --primary-blue: #04a1dd;
    --gradient-1: #ca250e;
    --gradient-2: #ca250e;
    --gradient-3: #eb7004;
    --text-dark: #2c3e50;
    --shadow-strong: 0 30px 50px rgba(0, 0, 0, 0.3);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background: radial-gradient(circle at center, white 0%, var(--primary-blue) 80%);
    display: flex;
    flex-direction: column;
}

/* ========== FLOATING BACKGROUND ELEMENTS ========== */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    color: rgba(255, 255, 255, 0.35);
    font-size: 2rem;
    animation: floatAround 25s infinite ease-in-out;
    text-shadow: 0 0 20px rgba(255,255,255,0.4);
    z-index: 2;
}

.book-1 {
    top: 8%;
    left: 3%;
    animation-delay: 0s;
    font-size: 3.2rem;
}

.book-2 {
    top: 78%;
    right: 5%;
    animation-delay: 2.5s;
    font-size: 3rem;
}

.book-3 {
    bottom: 12%;
    left: 10%;
    animation-delay: 4.2s;
    font-size: 2.8rem;
}

.book-4 {
    top: 42%;
    right: 12%;
    animation-delay: 6.5s;
    font-size: 3rem;
}

/* Background Letters */
.bg-letter {
    position: absolute;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.25);
    animation: floatBackground 20s infinite ease-in-out;
    z-index: 1;
    text-shadow: 0 0 25px rgba(255,255,255,0.3);
}

.letter-bg-1 {
    top: 5%;
    left: 5%;
    animation-delay: 0s;
    transform: rotate(-5deg);
}

.letter-bg-2 {
    top: 20%;
    right: 8%;
    animation-delay: 1.5s;
    transform: rotate(8deg);
}

.letter-bg-3 {
    bottom: 15%;
    left: 12%;
    animation-delay: 3s;
    transform: rotate(-10deg);
}

.letter-bg-4 {
    top: 45%;
    right: 15%;
    animation-delay: 4.5s;
    transform: rotate(12deg);
}

.letter-bg-5 {
    bottom: 30%;
    right: 5%;
    animation-delay: 6s;
    transform: rotate(-8deg);
}

.letter-bg-6 {
    top: 70%;
    left: 8%;
    animation-delay: 7.5s;
    transform: rotate(15deg);
}

@keyframes floatBackground {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -10px) rotate(3deg); }
    50% { transform: translate(-10px, 15px) rotate(-3deg); }
    75% { transform: translate(8px, -8px) rotate(2deg); }
}

@keyframes floatAround {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(25px, -15px) rotate(5deg); }
    50% { transform: translate(35px, 20px) rotate(0deg); }
    75% { transform: translate(15px, 25px) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* ========== MAIN CONTAINER ========== */
.main-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    z-index: 10;
    min-height: calc(100vh - 40px);
}

/* ========== BOOK CONTAINER ========== */
.book-container {
    position: relative;
    width: 1000px;
    height: 550px;
    perspective: 2500px;
    margin: 1rem auto;
}

/* Book Cover */
.book-cover {
    position: absolute;
    width: 70%;
    height: 100%;
    left: 15%;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-strong);
    z-index: 30;
    transform-origin: left center;
    transition: transform 1.2s cubic-bezier(0.34, 1.2, 0.64, 1);
    overflow: hidden;
}

.cover-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(202,37,14,0.15) 0%, transparent 30%),
        radial-gradient(circle at 85% 75%, rgba(235,112,4,0.15) 0%, transparent 35%),
        repeating-linear-gradient(45deg, transparent, transparent 25px, rgba(202,37,14,0.05) 25px, rgba(202,37,14,0.05) 26px);
    z-index: 5;
    pointer-events: none;
    border-radius: 15px;
}

.book-cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid transparent;
    border-radius: 15px;
    background: linear-gradient(135deg, #ca250e, #eb7004) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    z-index: 50;
    pointer-events: none;
    box-shadow: inset 0 0 20px rgba(202,37,14,0.5);
}

.cover-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem 2.5rem;
    position: relative;
    z-index: 40;
    background: transparent;
}

.cover-logo {
    width: 130px;
    height: auto;
    margin-bottom: 0.85rem;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
    position: relative;
    z-index: 45;
    transition: transform 0.5s ease;
}

.cover-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.2rem;
    line-height: 1.2;
    position: relative;
    z-index: 45;
    transition: all 0.4s ease;
}

.cover-title:hover {
    letter-spacing: 2px;
    transform: translateY(-2px);
}

.cover-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    position: relative;
    z-index: 45;
    transition: all 0.4s ease;
}

.cover-subtitle:hover {
    letter-spacing: 6px;
}

.cover-spacer {
    height: 10px;
}

.cover-quote {
    color: #555;
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 0.5rem;
    max-width: 300px;
    position: relative;
    z-index: 45;
    transition: all 0.4s ease;
}

.cover-quote:hover {
    color: #333;
    transform: translateY(-3px);
    font-style: normal;
}

.cover-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0 20px;
    width: 80%;
    max-width: 280px;
    z-index: 45;
    position: relative;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gradient-1), var(--gradient-3), transparent);
}

.cover-divider i {
    color: var(--gradient-1);
    font-size: 1.2rem;
    animation: gentlePulse 3s infinite ease-in-out;
}

.cover-signin {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    border: none;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(202,37,14,0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.5, 0.64, 1);
    border: 2px solid rgba(255,255,255,0.2);
    position: relative;
    z-index: 45;
    overflow: hidden;
}

.cover-signin::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cover-signin:hover::before {
    width: 300px;
    height: 300px;
}

.cover-signin:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 35px rgba(202,37,14,0.5);
    gap: 1.3rem;
}

.cover-signin i {
    transition: transform 0.4s cubic-bezier(0.34, 1.5, 0.64, 1);
}

.cover-signin:hover i {
    transform: translateX(12px) scale(1.2);
}

/* Book Back Cover */
.book-back {
    position: absolute;
    width: 70%;
    height: 100%;
    left: 15%;
    background: #f0f0f0;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    z-index: 20;
    transform: translateZ(-30px);
}

.book-back::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 15px;
    background: linear-gradient(135deg, #ca250e, #eb7004) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    z-index: 25;
    pointer-events: none;
    box-shadow: inset 0 0 15px rgba(202,37,14,0.3);
    opacity: 0.7;
}

/* Inner Page */
.book-page.single-page {
    position: absolute;
    width: 70%;
    height: 100%;
    left: 15%;
    background: white;
    box-shadow: var(--shadow-strong);
    transition: all 1.2s cubic-bezier(0.34, 1.2, 0.64, 1);
    visibility: hidden;
    opacity: 0;
    overflow: visible;
    border-radius: 15px;
    z-index: 35;
}

.book-page.single-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 15px;
    background: linear-gradient(135deg, #ca250e, #eb7004) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    z-index: 45;
    pointer-events: none;
    box-shadow: inset 0 0 15px rgba(202,37,14,0.3);
}

/* BOOK OPEN STATE */
.book-container.book-open .book-cover {
    transform: rotateY(-180deg) translateZ(10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 1.2s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.6s ease, visibility 0.6s ease;
    pointer-events: none;
}

.book-container.book-open .book-page.single-page {
    visibility: visible;
    opacity: 1;
    transform: rotateY(0deg) translateZ(40px);
    transition-delay: 0.2s;
    z-index: 50;
}

.book-container.book-open .book-back {
    z-index: 3;
    opacity: 0.3;
}

/* Page Inner Content */
.page-inner {
    height: 100%;
    padding: 2rem;
    position: relative;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    z-index: 30;
}

/* Page Columns Layout */
.page-columns {
    display: flex;
    height: 100%;
    gap: 2rem;
    position: relative;
    z-index: 35;
}

.page-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.left-column {
    border-right: 1px solid rgba(202,37,14,0.3);
    padding-right: 1.5rem;
}

.right-column {
    padding-left: 1rem;
}

/* Close button */
.page-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--gradient-1);
    color: var(--gradient-1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.5, 0.64, 1);
    z-index: 100;
    box-shadow: 0 4px 12px rgba(202,37,14,0.3);
}

.page-close:hover {
    background: var(--gradient-1);
    color: white;
    transform: rotate(180deg) scale(1.2);
    box-shadow: 0 6px 16px rgba(202,37,14,0.5);
}

.page-close i {
    font-size: 1.2rem;
    transition: transform 0.4s ease;
}

.page-close:hover i {
    transform: rotate(90deg);
}

/* Left Column Content */
.page-logo {
    width: 100px;
    height: auto;
    margin-bottom: 0.25rem;
    transition: transform 0.5s ease;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.2rem;
    transition: all 0.4s ease;
}

.page-title:hover {
    letter-spacing: 2px;
    transform: translateY(-2px);
}

.page-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
    margin-bottom: 0.23rem;
    transition: all 0.4s ease;
}

.page-subtitle:hover {
    letter-spacing: 4px;
}

.page-spacer {
    height: 15px;
}

.page-description {
    color: #555;
    font-size: 0.7rem;
    line-height: 1.6;
    margin: 0rem 0;
    max-width: 250px;
    transition: all 0.4s ease;
}

.page-description:hover {
    color: #333;
    transform: translateY(-3px);
}

.established {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: all 0.4s ease;
}

.established:hover {
    color: var(--gradient-1);
    transform: scale(1.05);
}

.established i {
    color: var(--gradient-1);
    transition: transform 0.4s ease;
}

.established:hover i {
    transform: rotate(360deg);
}

/* Right Column - Login Form */
.login-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gradient-1);
    margin-bottom: 1.2rem;
    transition: all 0.4s ease;
}

.login-heading:hover {
    letter-spacing: 2px;
    transform: translateY(-2px);
}

.login-form {
    width: 100%;
    max-width: 260px;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
    width: 100%;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #555;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    transition: all 0.3s ease;
}

.form-group label i {
    color: var(--primary-blue);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.form-group:hover label i {
    transform: scale(1.2) rotate(5deg);
    color: var(--gradient-1);
}

.input-wrapper {
    width: 100%;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--gradient-1);
    box-shadow: 0 0 0 4px rgba(202,37,14,0.2);
    transform: scale(1.02);
}

.form-input:hover {
    border-color: var(--gradient-1);
}

/* Captcha */
.captcha-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
}

.captcha-box {
    width: 65px;
    height: 40px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-3));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    flex-shrink: 0;
    transition: all 0.4s ease;
    box-shadow: 0 2px 5px rgba(202,37,14,0.2);
}

.captcha-box:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 5px 15px rgba(202,37,14,0.4);
}

.captcha-refresh {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gradient-1);
    background: white;
    border-radius: 8px;
    color: var(--gradient-1);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.5, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(202,37,14,0.2);
}

.captcha-refresh:hover {
    background: var(--gradient-1);
    color: white;
    transform: scale(1.15) rotate(180deg);
    box-shadow: 0 5px 15px rgba(202,37,14,0.5);
}

.captcha-refresh.rotate {
    animation: smoothSpin 0.6s cubic-bezier(0.34, 1.5, 0.64, 1);
}

@keyframes smoothSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.captcha-input-wrapper {
    flex: 1;
}

.captcha-input {
    width: 100%;
    height: 40px;
    padding: 0 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.4s ease;
}

.captcha-input:focus {
    outline: none;
    border-color: var(--gradient-1);
    box-shadow: 0 0 0 4px rgba(202,37,14,0.2);
    transform: scale(1.02);
}

.captcha-input:hover {
    border-color: var(--gradient-1);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    width: 100%;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #666;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    color: var(--gradient-1);
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.checkbox-label:hover .checkbox-custom {
    border-color: var(--gradient-1);
    transform: scale(1.1);
}

.checkbox-label input:checked + .checkbox-custom {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-3));
    border-color: transparent;
    transform: scale(1.1);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.6rem;
    animation: checkPop 0.3s cubic-bezier(0.34, 1.5, 0.64, 1);
}

@keyframes checkPop {
    0% { transform: translate(-50%, -50%) scale(0); }
    80% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.forgot-link {
    color: var(--gradient-1);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.forgot-link:hover {
    color: var(--gradient-3);
    transform: translateX(3px);
    text-decoration: underline;
}

/* Login Submit Button */
.login-submit {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.4s cubic-bezier(0.34, 1.5, 0.64, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(202,37,14,0.3);
}

.login-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.login-submit:hover::before {
    width: 300px;
    height: 300px;
}

.login-submit:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 25px rgba(202,37,14,0.5);
    gap: 0.8rem;
}

.login-submit.loading {
    opacity: 0.8;
    pointer-events: none;
}

.login-submit i {
    transition: transform 0.4s ease;
}

.login-submit:hover i {
    transform: translateX(8px) scale(1.2);
}

.register-text {
    text-align: center;
    margin-top: 1rem;
    color: #777;
    font-size: 0.7rem;
    transition: all 0.3s ease;
}

.register-text:hover {
    color: #555;
}

.register-text a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.register-text a:hover {
    color: var(--gradient-1);
    text-decoration: underline;
    letter-spacing: 0.5px;
}

/* ========== FOOTER ========== */
.page-footer {
    width: 100%;
    text-align: center;
    padding: 0.8rem;
    color: white;
    font-size: 0.8rem;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
    z-index: 100;
    position: relative;
    margin-top: 0.5rem;
    transition: all 0.4s ease;
}

.page-footer:hover {
    background: rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========== RESPONSIVE DESIGN ========== */

/* Small Desktop / Large Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .book-container {
        width: 90%;
        height: 500px;
    }

    .cover-title {
        font-size: 2rem;
    }

    .cover-subtitle {
        font-size: 1.95rem;
    }

    .cover-quote {
        font-size: 0.9rem;
    }

    .cover-signin {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    .page-title {
        font-size: 1.4rem;
    }

    .login-heading {
        font-size: 1.5rem;
    }

    .login-form {
        max-width: 240px;
    }
}

/* Tablets (max-width: 768px) */
@media (max-width: 768px) {
    .main-container {
        padding: 0.5rem;
    }

    .book-container {
        width: 100%;
        height: auto;
        min-height: 550px;
        max-width: 450px;
        margin: 0.5rem auto;
    }

    .book-cover,
    .book-back,
    .book-page.single-page {
        width: 100%;
        left: 0;
    }

    .cover-inner {
        padding: 1.5rem 1rem;
    }

    .cover-logo {
        width: 75px;
        margin-bottom: 0.8rem;
    }

    .cover-title {
        font-size: 1.8rem;
    }

    .cover-subtitle {
        font-size: 1rem;
        letter-spacing: 3px;
        margin-bottom: 0.8rem;
    }

    .cover-quote {
        font-size: 0.9rem;
        margin: 0.5rem 0;
    }

    .cover-divider {
        margin: 10px 0 15px;
        gap: 10px;
    }

    .cover-signin {
        padding: 0.8rem 1.8rem;
        font-size: 0.95rem;
    }

    .page-inner {
        padding: 1.5rem 1rem;
        min-height: 550px;
        display: flex;
        align-items: center;
    }

    .page-columns {
        flex-direction: column;
        gap: 0.5rem;
        height: auto;
        width: 100%;
    }

    .left-column {
        display: none;
    }

    .right-column {
        padding: 0.5rem;
        width: 100%;
        height: auto;
        justify-content: center;
    }

    .login-heading {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        margin-top: 0.5rem;
    }

    .login-form {
        max-width: 280px;
        margin: 0 auto;
    }

    .form-group {
        margin-bottom: 0.8rem;
    }

    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }

    .form-input {
        padding: 0.7rem;
        font-size: 0.85rem;
    }

    .captcha-wrapper {
        gap: 0.4rem;
    }

    .captcha-box {
        width: 60px;
        height: 40px;
        font-size: 1.1rem;
    }

    .captcha-refresh {
        width: 40px;
        height: 40px;
    }

    .captcha-input {
        height: 40px;
    }

    .form-options {
        margin: 0.8rem 0;
    }

    .login-submit {
        padding: 0.8rem;
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }

    .register-text {
        margin-top: 0.8rem;
        margin-bottom: 0.3rem;
        font-size: 0.7rem;
    }

    .page-close {
        top: 0.8rem;
        right: 0.8rem;
        width: 34px;
        height: 34px;
    }

    .floating-element {
        font-size: 2rem;
    }

    .bg-letter {
        font-size: 3rem;
    }

    .page-footer {
        padding: 0.6rem;
        font-size: 0.75rem;
    }

    .book-container.book-open .book-cover {
        transform: rotateY(-180deg) translateZ(5px);
    }

    .book-container.book-open .book-page.single-page {
        transform: rotateY(0deg) translateZ(20px);
    }
}

/* Small phones (max-width: 480px) */
@media (max-width: 480px) {
    .main-container {
        padding: 0.3rem;
    }

    .book-container {
        min-height: 500px;
    }

    .cover-inner {
        padding: 1rem 0.8rem;
    }

    .cover-logo {
        width: 65px;
        margin-bottom: 0.5rem;
    }

    .cover-title {
        font-size: 1.6rem;
    }

    .cover-subtitle {
        font-size: 1rem;
        letter-spacing: 2px;
        margin-bottom: 0.5rem;
    }

    .cover-quote {
        font-size: 0.8rem;
        max-width: 220px;
    }

    .cover-divider {
        margin: 8px 0 12px;
        gap: 8px;
    }

    .cover-divider i {
        font-size: 1rem;
    }

    .cover-signin {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
        gap: 0.8rem;
    }

    .page-inner {
        padding: 1.2rem 0.8rem;
        min-height: 480px;
    }

    .right-column {
        padding: 0.2rem;
    }

    .login-heading {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
        margin-top: 0.2rem;
    }

    .login-form {
        max-width: 260px;
    }

    .form-group {
        margin-bottom: 0.6rem;
    }

    .form-group label {
        font-size: 0.75rem;
    }

    .form-input {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .captcha-box {
        width: 55px;
        height: 38px;
        font-size: 1rem;
    }

    .captcha-refresh {
        width: 38px;
        height: 38px;
    }

    .captcha-input {
        height: 38px;
        font-size: 0.8rem;
    }

    .form-options {
        margin: 0.6rem 0;
    }

    .checkbox-label {
        font-size: 0.7rem;
    }

    .checkbox-custom {
        width: 14px;
        height: 14px;
    }

    .forgot-link {
        font-size: 0.7rem;
    }

    .login-submit {
        padding: 0.7rem;
        font-size: 0.85rem;
        margin-bottom: 0.1rem;
    }

    .register-text {
        margin-top: 0.6rem;
        margin-bottom: 0.2rem;
        font-size: 0.65rem;
    }

    .page-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 32px;
        height: 32px;
    }

    .page-close i {
        font-size: 1rem;
    }

    .floating-element {
        font-size: 1.5rem;
    }

    .bg-letter {
        font-size: 2.5rem;
    }

    .page-footer {
        padding: 0.5rem;
        font-size: 0.65rem;
    }
}

/* Very small phones (max-width: 360px) */
@media (max-width: 360px) {
    .cover-title {
        font-size: 1.4rem;
    }

    .cover-subtitle {
        font-size: 1rem;
    }

    .cover-logo {
        width: 80px;
    }

    .login-heading {
        font-size: 1.3rem;
    }

    .login-form {
        max-width: 240px;
    }

    .form-input {
        padding: 0.5rem;
    }

    .captcha-box {
        width: 50px;
        height: 36px;
    }

    .captcha-refresh {
        width: 36px;
        height: 36px;
    }

    .captcha-input {
        height: 36px;
    }

    .page-inner {
        min-height: 450px;
        padding: 1rem 0.5rem;
    }
}

/* Landscape orientation */
@media (max-height: 600px) and (orientation: landscape) {
    .main-container {
        min-height: auto;
        padding: 0.3rem;
    }

    .book-container {
        min-height: 400px;
        height: auto;
    }

    .cover-inner {
        padding: 0.8rem;
    }

    .cover-logo {
        width: 70px;
    }

    .cover-title {
        font-size: 1.3rem;
    }

    .cover-subtitle {
        font-size: 1rem;
    }

    .page-inner {
        min-height: 400px;
        padding: 1rem;
    }

    .right-column {
        justify-content: center;
    }

    .login-heading {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .form-group {
        margin-bottom: 0.4rem;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .main-container {
        padding: 1rem;
    }

    .book-container {
        margin: 1rem auto;
    }

    .page-footer {
        padding: 0.8rem;
    }
}