/* FM Malithi ෆොන්ට් එක කේතයට එකතු කිරීම */
@font-face {
    font-family: 'MalithiCustom';
    src: url('FM-Malithi-x.ttf') format('truetype');
}

/* සම්පූර්ණ පිටුවේ පෙනුම (Dark Modern Gradient) */
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    padding: 40px 20px; 
    margin: 0;
    /* අඳුරු සහ ගැඹුරු Gradient පසුබිමක් */
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
}

h2 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 30px;
    font-size: 32px;
    letter-spacing: 1px;
}

/* =========================================
   Left & Right Layout (වම සහ දකුණ)
   ========================================= */
.container { 
    display: flex; 
    flex-direction: row; /* වම සහ දකුණ ලෙස බෙදීම */
    gap: 40px; 
    flex-wrap: wrap; /* කුඩා Screen වලදී පමණක් යටට යයි */
    justify-content: center;
    align-items: flex-start; /* කොටස් දෙකම උඩින් සමානව පටන් ගැනීමට */
    width: 100%;
    max-width: 1300px; /* කොටස් දෙකම නිදහසේ තබා ගැනීමට පළල වැඩිකර ඇත */
}

/* =========================================
   Dark Glassmorphism (වම් පස පෝරමය)
   ========================================= */
.form-section { 
    background: rgba(15, 23, 42, 0.65); /* අඳුරු විනිවිද පෙනෙන පැහැය */
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
    padding: 35px 30px; 
    border-radius: 20px; 
    width: 380px; 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4); 
    border: 1px solid rgba(255, 255, 255, 0.08); /* ඉතා සියුම් දිලිසෙන දාරයක් */
}

.form-section label { 
    display: block; 
    margin-top: 15px; 
    font-weight: 600; 
    color: #cbd5e1; /* ළා අළු පැහැයක් */
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* Inputs සහ Select Boxes Dark කිරීම */
.form-section input, .form-section select { 
    width: 100%; 
    padding: 12px 15px; 
    margin-top: 8px; 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 10px; 
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.4); /* Input එකේ ඇතුලත කළු වීම */
    color: #ffffff; /* Type කරන අකුරු සුදු වීම */
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

/* Box එකක් click කළ විට පෙනුම (Focus state) */
.form-section input:focus, .form-section select:focus {
    background: rgba(0, 0, 0, 0.6);
    border-color: #3b82f6; /* Blue focus ring එකක් */
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

/* Dropdown (Select) එකේ Options වල පාට වෙනස් කිරීම */
.form-section select option {
    background-color: #1e293b;
    color: #ffffff;
}

/* =========================================
   දකුණු පස Preview කොටස
   ========================================= */
.preview-section { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

/* පෝස්ටරයේ රාමුව */
#postBox {
    width: 800px; 
    height: 500px;
    position: relative; 
    overflow: hidden; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.6); /* පෝස්ටරය පිටුපස සෙවනැල්ල */
    background-color: #000; 
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bg-image {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    z-index: 0; 
}

/* පෝස්ටරයේ අකුරු වල පිහිටීම */
#postText { 
    position: absolute; 
    top: 27%; 
    left: 0; 
    width: 55%; 
    text-align: center; 
    font-family: 'MalithiCustom', Arial, sans-serif;
    font-size: 20px; 
    line-height: 1.5; 
    color: #eeeeee; 
    pointer-events: none; 
    z-index: 1; 
}

/* =========================================
   Modern Neon/Gradient Button
   ========================================= */
button { 
    margin-top: 30px; 
    padding: 15px 35px; 
    /* අඳුරු Theme එකට ගැලපෙන නියොන් නිල් සහ දම් Gradient එකක් */
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white; 
    border: none; 
    cursor: pointer; 
    border-radius: 30px; 
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 1px;
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
}

button:active {
    transform: translateY(1px); 
}