/* ============================================
   Modul My Tilawah — Landing Page & Flipbook
   ============================================ */

/* Landing Page */
.tilawah-landing {
    min-height: 100vh;
    background: linear-gradient(135deg, #0d4a3a 0%, #1a6b52 30%, #0d4a3a 60%, #1a3a2f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 1rem;
}

.tilawah-landing::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.tilawah-landing .particles {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.tilawah-landing .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    animation: floatParticle 8s infinite ease-in-out;
}

.tilawah-landing .particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 7s; }
.tilawah-landing .particle:nth-child(2) { left: 25%; top: 60%; animation-delay: 1s; animation-duration: 9s; }
.tilawah-landing .particle:nth-child(3) { left: 50%; top: 30%; animation-delay: 2s; animation-duration: 6s; }
.tilawah-landing .particle:nth-child(4) { left: 70%; top: 70%; animation-delay: 3s; animation-duration: 8s; }
.tilawah-landing .particle:nth-child(5) { left: 85%; top: 40%; animation-delay: 4s; animation-duration: 10s; }
.tilawah-landing .particle:nth-child(6) { left: 40%; top: 80%; animation-delay: 5s; animation-duration: 7s; }

@keyframes floatParticle {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
    50% { transform: translateY(-80px) scale(1.5); opacity: 0.6; }
}

.tilawah-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 600px;
    width: 100%;
}

/* Logo */
.tilawah-logo {
    margin-bottom: 2.5rem;
}

.tilawah-logo h1 {
    font-family: 'Georgia', serif;
    color: #D4AF37;
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 20px rgba(212, 175, 55, 0.3);
    letter-spacing: 1px;
}

.tilawah-logo h1 span {
    font-style: italic;
    font-weight: 400;
    font-size: 2.8rem;
}

.tilawah-logo p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-top: 0.5rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Buttons */
.tilawah-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tilawah-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.1rem 2rem;
    border: none;
    border-radius: 14px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.tilawah-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.tilawah-btn:hover::before {
    left: 100%;
}

.tilawah-btn-silabus {
    background: linear-gradient(135deg, #D4AF37, #C5992E, #E8C547);
    color: #1a3a2f;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
}

.tilawah-btn-silabus:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
}

.tilawah-btn-metode {
    background: linear-gradient(135deg, #1a8b6b, #15a67e, #0d8e68);
    color: #fff;
    box-shadow: 0 4px 20px rgba(26, 139, 107, 0.4);
}

.tilawah-btn-metode:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(26, 139, 107, 0.5);
}

.tilawah-btn i {
    font-size: 1.3rem;
}

/* Mockup Image */
.tilawah-mockup {
    max-width: 380px;
    margin: 0 auto;
}

.tilawah-mockup img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
    transition: transform 0.4s ease;
}

.tilawah-mockup img:hover {
    transform: scale(1.03);
}

/* Login Modal */
.tilawah-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.tilawah-modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.tilawah-modal {
    background: linear-gradient(145deg, #1a4a3a, #0d3a2a);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tilawah-modal .close-modal {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

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

.tilawah-modal h3 {
    color: #D4AF37;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.tilawah-modal .modal-subtitle {
    color: rgba(255,255,255,0.6);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.tilawah-modal .form-group {
    margin-bottom: 1.2rem;
}

.tilawah-modal label {
    display: block;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.tilawah-modal input[type="text"],
.tilawah-modal input[type="password"] {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.tilawah-modal input:focus {
    outline: none;
    border-color: #D4AF37;
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.tilawah-modal .login-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #D4AF37, #C5992E);
    color: #1a3a2f;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.5rem;
}

.tilawah-modal .login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

.tilawah-modal .login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.tilawah-modal .error-msg {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
    text-align: center;
}

.tilawah-modal .error-msg.show {
    display: block;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* ============================================
   Flipbook Viewer
   ============================================ */
.flipbook-page {
    min-height: 100vh;
    background: #1a1a2e;
    display: flex;
    flex-direction: column;
}

.flipbook-header {
    background: linear-gradient(135deg, #0d4a3a, #1a6b52);
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 15px rgba(0,0,0,0.3);
    z-index: 100;
}

.flipbook-header h2 {
    color: #D4AF37;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.flipbook-header .back-btn {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: color 0.2s;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.flipbook-header .back-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

.flipbook-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
}

.flipbook-wrapper {
    position: relative;
    max-width: 900px;
    width: 100%;
}

#flipbook {
    margin: 0 auto;
}

.flipbook-page-content {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.flipbook-page-content canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Navigation */
.flipbook-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem;
    background: rgba(0,0,0,0.3);
}

.flipbook-nav button {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.flipbook-nav button:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #D4AF37;
}

.flipbook-nav .page-info {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

/* Loading */
.flipbook-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: rgba(255,255,255,0.7);
    min-height: 400px;
}

.flipbook-loading .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: #D4AF37;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .tilawah-logo h1 { font-size: 2.5rem; }
    .tilawah-logo h1 span { font-size: 2rem; }
    .tilawah-btn { font-size: 1rem; padding: 1rem 1.5rem; }
    .tilawah-mockup { max-width: 280px; }
    .tilawah-modal { padding: 1.5rem; margin: 1rem; }
    .flipbook-header h2 { font-size: 0.9rem; }
}

@media (max-width: 480px) {
    .tilawah-logo h1 { font-size: 2rem; }
    .tilawah-logo h1 span { font-size: 1.6rem; }
    .tilawah-content { padding: 0 0.5rem; }
}
