/* --- VARIABLES --- */
:root {
    --primary: #ff5900;
    --primary-dark: #cc4600;
    --gradient: linear-gradient(135deg, #ff5900, #ff9045);
    --glass: rgba(255, 255, 255, 0.85);
    --border: 1px solid rgba(255, 255, 255, 0.6);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --text: #2d3436;
}

/* --- RESET --- */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Removes blue highlight on tap */
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: url("background.jpg") center/cover fixed no-repeat;
    background-color: #f4f4f4; /* Fallback */
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --- NAVBAR --- */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: 0 auto;
}

.navbar-logo {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.nav-links {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

/* Mobile Menu Styles */
.menu-icon {
    display: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
}

.close-btn-item { display: none; }

@media (max-width: 768px) {
    .menu-icon { display: block; }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        gap: 40px;
        z-index: 1001;
    }

    .nav-menu.show { right: 0; }
    
    .nav-links { font-size: 1.2rem; }
    
    .close-btn-item {
        display: block;
        position: absolute;
        top: 20px;
        right: 25px;
        font-size: 1.5rem;
        cursor: pointer;
    }
}

/* --- MAIN LAYOUT --- */
main {
    flex: 1;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- EDITOR CARD --- */
.editor-container {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 30px 20px;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    margin-top: 10px;
}

.upload-area { width: 100%; }

.btn-upload {
    background: var(--gradient);
    color: white;
    padding: 15px 0;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(255, 89, 0, 0.3);
    font-size: 1rem;
}

.canvas-wrapper {
    width: 100%;
    aspect-ratio: 1/1; /* Keeps it square */
    background: #fff;
    border-radius: 12px;
    border: 2px dashed #ddd;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    max-width: 100%;
    display: block;
}

#loading-text { color: #888; position: absolute; }

.tips {
    font-size: 0.8rem;
    color: #666;
    background: rgba(255,255,255,0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

.btn-download {
    background: #333;
    color: white;
    width: 100%;
    padding: 15px 0;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    opacity: 0.5;
    pointer-events: none;
    transition: 0.3s;
}

.btn-download.active {
    opacity: 1;
    pointer-events: all;
    background: var(--primary);
}

/* --- TEXT SECTION --- */
.info-section {
    max-width: 800px;
    margin-top: 40px;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.kannada-text h3 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
    padding-bottom: 5px;
}

.kannada-text p {
    text-align: justify;
    line-height: 1.8;
    color: #444;
    font-size: 0.95rem;
    margin: 0;
}

/* --- FOOTER --- */
.footer {
    margin-top: auto;
    text-align: center;
    padding: 20px;
    background: white;
    color: #666;
    font-size: 0.9rem;
}

.social-link {
    color: #E1306C;
    text-decoration: none;
    font-weight: bold;
}
input[type="file"] {
    display: none !important;
}
