@import url('https://fonts.googleapis.com/css2?family=Amiri+Quran&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&display=swap');
* {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}
body {
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f4f7f9;
}
body.is-dragging-ruler {
    cursor: ns-resize;
}
#scale-wrapper {
    position: relative;
    z-index: 1;
}
.app-container {
    width: 1440px;
    height: 810px;
    transform-origin: top left;
    will-change: transform;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #f4f7f9;
    overflow: hidden;
}
@font-face {
    font-family: 'KFGQPC HafsEx1 Uthmanic Script';
    src: url('../fonts/Hafs.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}
input, textarea, select, [contenteditable] {
    user-select: text;
    -webkit-user-select: text;
    -ms-user-select: text;
}
a, button, label[for] {
    user-select: auto;
    -webkit-user-select: auto;
    -ms-user-select: auto;
    cursor: pointer;
}
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    list-style: none;
    z-index: 0;
}
.background-shapes li {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'KFGQPC HafsEx1 Uthmanic Script', 'Amiri Quran', Arial, sans-serif;
    animation: animate 25s linear infinite;
    bottom: -150px;
    font-weight: bold;
    color: rgba(44, 62, 80, 0.08);
}
@keyframes animate {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-120vh) rotate(720deg); opacity: 0; }
}
#portrait-mode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 9999;
    padding: 20px;
    font-size: 1.2em;
}
body.portrait-mode #portrait-mode-overlay {
    display: flex;
}
.background-shapes li:nth-child(1) { left: 25%; font-size: 80px; animation-delay: 0s; }
.background-shapes li:nth-child(2) { left: 10%; font-size: 20px; animation-delay: 2s; animation-duration: 12s; }
.background-shapes li:nth-child(3) { left: 70%; font-size: 20px; animation-delay: 4s; }
.background-shapes li:nth-child(4) { left: 40%; font-size: 60px; animation-delay: 0s; animation-duration: 18s; }
.background-shapes li:nth-child(5) { left: 65%; font-size: 20px; animation-delay: 0s; }
.background-shapes li:nth-child(6) { left: 75%; font-size: 110px; animation-delay: 3s; }
.background-shapes li:nth-child(7) { left: 35%; font-size: 150px; animation-delay: 7s; }
.background-shapes li:nth-child(8) { left: 50%; font-size: 25px; animation-delay: 15s; animation-duration: 45s; }
.background-shapes li:nth-child(9) { left: 20%; font-size: 15px; animation-delay: 2s; animation-duration: 35s; }
.background-shapes li:nth-child(10) { left: 85%; font-size: 150px; animation-delay: 0s; animation-duration: 11s; }
html {
    font-family: 'Cairo', sans-serif;
}
.landing-body {
    overflow: auto !important;
    display: block !important;
    background: radial-gradient(ellipse at bottom, #eef0f2 0%, #f8f9fa 100%);
    margin: 0;
    padding: 20px;
    color: #333;
    box-sizing: border-box;
    min-height: 100vh;
}
.landing-container {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px 1fr;
    grid-template-rows: auto minmax(450px, auto) auto;
    grid-template-areas:
        "header header header"
        "scroll panel special"
        "footer footer footer";
    gap: 15px;
    position: relative;
    z-index: 2;
}
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    list-style: none;
    z-index: 0;
}
.background-shapes li {
    position: absolute;
    display: block;
    color: rgba(46, 164, 79, 0.08);
    animation: twinkle 25s linear infinite;
    bottom: -150px;
    font-size: 80px;
}
.background-shapes li:nth-child(2) { left: 10%; font-size: 20px; animation-delay: 2s; animation-duration: 12s; }
.background-shapes li:nth-child(5) { left: 70%; font-size: 30px; animation-delay: 4s; }
.background-shapes li:nth-child(8) { left: 85%; font-size: 120px; animation-delay: 1s; animation-duration: 22s; }
@keyframes twinkle {
    0% { transform: translateY(0); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(-120vh); opacity: 0; }
}
.landing-header {
    grid-area: header;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.hero-icon {
    width: clamp(45px, 8vw, 60px);
    animation: bounce-slow 4s ease-in-out infinite;
}
.landing-header h1 {
    font-family: 'Marhey', cursive;
    font-size: clamp(2.2rem, 8vw, 3.5rem);
    margin: 0;
    color: #2ea44f;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.version-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background-color: #6a737d;
    padding: 3px 8px;
    border-radius: 10px;
    align-self: flex-start;
    margin-top: 0.5rem;
}
.landing-header p {
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    color: #586069;
    margin: 0;
}
.central-panel {
    grid-area: panel;
    background: #ffffff;
    box-shadow: inset 3px 3px 6px rgba(8, 88, 30, 0.45), inset -3px -3px 6px rgba(8, 88, 30, 0.45);
    border-radius: 5px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-width: 280px;
}
.form-toggle, .auth-form input, .btn-submit, .custom-checkbox, .info-scroll, .special-scroll {
    transition: all 0.3s ease;
}
.form-toggle {
    display: flex;
    border-bottom: 2px solid #e1e4e8;
    margin-bottom: 15px;
}
.toggle-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    color: #6a737d;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}
.toggle-btn:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2ea44f;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.toggle-btn.active {
    color: #24292e;
}
.toggle-btn.active:after {
    transform: scaleX(1);
}
.form-container {
    display: none;
}
.form-container.active {
    display: block;
    animation: fadeInForm 0.5s ease;
}
@keyframes fadeInForm {
    from { opacity: 0; }
    to { opacity: 1; }
}
.auth-form input {
    width: 100%;
    padding: 10px;
    background: #f6f8fa;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    font-size: 14px;
    color: #24292e;
    margin-bottom: 15px;
}
.auth-form input:focus {
    outline: none;
    border-color: #2ea44f;
    box-shadow: 0 0 0 3px rgba(46, 164, 79, 0.2);
}
.input-group {
    position: relative;
}
.input-group .material-symbols-outlined {
    position: absolute;
    left: 12px;
    top: 11px;
    color: #959da5;
}
.input-group input {
    padding-left: 40px !important;
}
.btn-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(145deg, #34d058, #28a745);
    text-shadow: 0 -1px 0 rgba(0,0,0,0.2);
    margin-top: 10px;
    box-shadow: 0 4px 0 #218838;
}
.btn-submit:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #218838;
}
.btn-submit:active {
    transform: translateY(4px);
    box-shadow: none;
}
.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.custom-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
}
.custom-checkbox .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5da;
    border-radius: 22px;
}
.custom-checkbox .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: .4s;
}
.custom-checkbox input:checked + .slider {
    background-color: #2ea44f;
}
.custom-checkbox input:checked + .slider:before {
    transform: translateX(18px);
}
.checkbox-label {
    color: #586069;
    font-size: 13px;
    margin-left: 10px;
    cursor: pointer;
}
.info-scroll, .special-scroll {
    background-color: #ffffff;
    border: 2px solid #c3e6cb;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.08);
    border-radius: 5px;
    padding: 0;
    overflow: hidden;
    position: relative;
}
.info-scroll {
    grid-area: scroll;
    transform: rotate(-2deg);
}
.special-scroll {
    grid-area: special;
    transform: rotate(2deg);
}
.scroll-viewport {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 20px;
}
.scroll-viewport::-webkit-scrollbar {
    width: 8px;
}
.scroll-viewport::-webkit-scrollbar-track {
    background: #eafaf1;
}
.scroll-viewport::-webkit-scrollbar-thumb {
    background-color: #28a745;
    border-radius: 4px;
}
.scroll-content {
    color: #586069;
}
.scroll-content h1, .scroll-content h2 {
    color: #155724;
    border-bottom: 1px solid #c3e6cb;
}
.scroll-content a {
    color: #218838;
}
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #2ea44f;
    color: #ffffff;
    border: 2px solid #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
}
.close-btn:hover {
    background: #218838;
}
.close-btn.hidden {
    display: none;
}
.landing-footer {
    grid-area: footer;
    text-align: center;
    color: #6a737d;
    font-size: 13px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.legal-links a {
    color: #586069;
    text-decoration: none;
    margin: 0 10px;
    cursor: pointer;
}
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    color: #333;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-top: 1px solid #e1e4e8;
    flex-wrap: wrap;
    text-align: center;
}
.cookie-consent-banner p {
    margin: 5px 15px;
}
.cookie-consent-banner a {
    color: #2ea44f;
}
.cookie-consent-banner button {
    background-color: #2ea44f;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin: 5px;
}
.error-message {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 13px;
}
.success-message {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 13px;
}
@media (max-width: 1000px) {
    .landing-container {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "header header"
            "panel scroll"
            "special special"
            "footer footer";
    }
    .info-scroll, .special-scroll {
        transform: rotate(0deg);
    }
    .special-scroll {
        grid-area: special;
        z-index: 20;
        min-height: 300px;
    }
}
@media (max-width: 768px) {
    .landing-body {
        padding: 20px 15px;
    }
    .landing-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto auto;
        grid-template-areas:
            "header"
            "panel"
            "scroll"
            "special"
            "footer";
        gap: 20px;
    }
    .info-scroll, .special-scroll {
        transform: rotate(0deg);
        min-height: 300px;
        position: relative;
        top: auto;
        left: auto;
        width: auto;
        height: auto;
        z-index: 1;
        border-radius: 5px;
    }
    .scroll-viewport {
        padding: 20px;
    }
}
.loading-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f4f7f9;
}
.loading-logo {
    width: 120px;
    height: 120px;
    animation: float-animation 6s ease-in-out infinite;
    margin-bottom: 20px;
}
@keyframes float-animation {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}
.loading-title {
    font-size: 5rem;
    font-weight: 800;
    margin: 0;
    color: #2c3e50;
}
.loading-subtitle {
    font-size: 1.2rem;
    color: #586069;
    margin-top: 10px;
    margin-bottom: 40px;
}
.progress-bar-container {
    width: 400px;
    height: 10px;
    background-color: #e1e4e8;
    border-radius: 5px;
    overflow: hidden;
}
.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #2ea44f;
    border-radius: 5px;
}
@keyframes load {
    from { width: 0%; }
    to { width: 100%; }
}
