/* --- Global & Theme Styles --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

body {
    background-color: #0f172a; 
    background-image: radial-gradient(at 50% 0%, rgba(59, 130, 246, 0.1) 0, transparent 50%), 
                      radial-gradient(at 50% 100%, rgba(99, 102, 241, 0.1) 0, transparent 50%);
    background-attachment: fixed;
    color: #f1f5f9;
    min-height: 100vh;
    display: flex; flex-direction: column;
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(16px);
    padding: 10px 5%; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06); height: 70px; position: sticky; top: 0; z-index: 1000;
}
.navbar .logo { display: flex; align-items: center; gap: 12px; text-decoration: none; height: 100%; }
.navbar .logo .icon-box {
    width: 40px; height: 40px; border-radius: 8px; background: transparent;
    display: flex; align-items: center; justify-content: center; overflow: hidden; margin-top: 5px; 
}
.navbar .logo .icon-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.navbar .logo-text { font-size: 1.5rem; font-weight: 700; color: #3b82f6; display: flex; align-items: center; line-height: 1; }

/* Logo Animation */
.logo-letter {
    display: inline-block; opacity: 0; transform: translate(0, 0);
    animation-duration: 0.5s; animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes comeFromTop { 0% { opacity: 0; transform: translateY(-30px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes comeFromBottom { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes comeFromRight { 0% { opacity: 0; transform: translateX(30px); } 100% { opacity: 1; transform: translateX(0); } }
.anim-top { animation-name: comeFromTop; }
.anim-bottom { animation-name: comeFromBottom; }
.anim-right { animation-name: comeFromRight; }


/* Main Container */
.main-container { max-width: 1100px; width: 95%; margin: 60px auto; padding: 0; flex: 1; }

/* Tool Container */
.tool-container {
    position: relative; padding: 40px 30px; border-radius: 20px; overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 25%, #312e81 50%, #1e1b4b 75%, #0f172a 100%);
    background-size: 400% 400%; animation: gradientFlowNormal 15s ease infinite; 
    border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
@keyframes gradientFlowNormal { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* Header */
.tool-header {
    display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 40px; padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); position: relative; z-index: 2;
}
.tool-logo {
    width: 64px; height: 64px; border-radius: 14px; background: transparent; 
    border: 1px solid rgba(255, 255, 255, 0.2); overflow: hidden; flex-shrink: 0;
}
.tool-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tool-title { margin: 0; color: #ffffff; font-size: 1.8rem; font-weight: 600; }


/* --- Converter Layout --- */
.converter-wrapper {
    display: flex; flex-direction: row; gap: 30px; position: relative; z-index: 2;
}
.input-group, .output-group { flex: 1; display: flex; flex-direction: column; }

.label-txt {
    font-weight: 500; margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
    color: #cbd5e1; font-size: 0.95rem;
}

/* Textarea (Glass Style) */
textarea {
    width: 100%; height: 250px; padding: 15px;
    background-color: rgba(15, 23, 42, 0.6); backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 10px;
    color: #ffffff; font-family: 'Courier New', Courier, monospace; font-size: 15px;
    resize: vertical; outline: none; transition: all 0.3s ease;
}
textarea:focus { border-color: #3b82f6; background-color: rgba(15, 23, 42, 0.9); }
textarea[readonly] { background-color: rgba(0, 0, 0, 0.4); cursor: default; }

/* Buttons (Flat Style - No Shadow) */
.action-buttons {
    display: flex; justify-content: center; gap: 20px; margin-top: 30px; position: relative; z-index: 2;
}
.btn {
    padding: 12px 30px; border: none; border-radius: 8px; font-size: 16px; font-weight: 500; cursor: pointer;
    display: flex; align-items: center; gap: 10px; transition: transform 0.2s, background 0.3s;
    min-width: 120px; justify-content: center; box-shadow: none !important;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: linear-gradient(135deg, #2563eb, #6366f1); color: white; }
.btn-primary:hover { background: linear-gradient(135deg, #1d4ed8, #4f46e5); }

.btn-secondary { background: #334155; color: #e2e8f0; border: 1px solid rgba(255,255,255,0.1); }
.btn-secondary:hover { background-color: #ef4444; color: white; border-color: #ef4444; }

/* Copy Button */
.copy-btn-area { text-align: right; margin-top: 10px; }
.btn-copy {
    padding: 8px 15px; font-size: 13px; background-color: rgba(30, 41, 59, 0.8);
    color: #cbd5e1; border: 1px solid rgba(255,255,255,0.1); border-radius: 6px;
    cursor: pointer; transition: 0.3s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-copy:hover { background-color: #3b82f6; color: white; border-color: #3b82f6; }

/* Footer */
footer {
    text-align: center; padding: 25px; color: #94a3b8; background-color: #0b0f19;
    margin-top: auto; border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .converter-wrapper { flex-direction: column; gap: 20px; }
    textarea { height: 180px; }
    .action-buttons { flex-direction: column-reverse; gap: 15px; }
    .btn { width: 100%; }
}