/* --- 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: 1000px; 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; }


/* --- Word Counter Specifics --- */

/* Stats Grid */
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; position: relative; z-index: 2;
}
.stat-box {
    background: rgba(30, 41, 59, 0.6); border-radius: 12px; padding: 20px;
    text-align: center; border: 1px solid rgba(255,255,255,0.05);
    display: flex; flex-direction: column; gap: 5px; transition: transform 0.3s;
}
.stat-box:hover { transform: translateY(-5px); background: rgba(30, 41, 59, 0.8); }

.stat-number { font-size: 2.5rem; font-weight: 700; color: white; line-height: 1.1; }
.stat-label { font-size: 0.9rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }

/* Stat Colors */
.color-blue .stat-number { color: #3b82f6; }
.color-purple .stat-number { color: #d8b4fe; }
.color-orange .stat-number { color: #fdba74; }
.color-green .stat-number { color: #86efac; }


/* Settings Bar */
.settings-bar {
    margin-bottom: 15px; position: relative; z-index: 2; display: flex; justify-content: flex-end;
}
.checkbox-item { display: flex; align-items: center; gap: 10px; background: rgba(30, 41, 59, 0.6); padding: 8px 15px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); }
input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: #3b82f6; }
.checkbox-item label { cursor: pointer; font-size: 0.9rem; color: #cbd5e1; }


/* Text Area */
.input-section { position: relative; z-index: 2; margin-bottom: 30px; }
textarea {
    width: 100%; height: 350px; padding: 20px;
    background-color: rgba(15, 23, 42, 0.6); backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 12px;
    color: #ffffff; font-family: 'Poppins', sans-serif; font-size: 16px; line-height: 1.6;
    resize: vertical; outline: none; transition: all 0.3s ease;
}
textarea:focus { border-color: #3b82f6; background-color: rgba(15, 23, 42, 0.9); }


/* Buttons */
.action-buttons {
    display: flex; justify-content: center; gap: 20px; 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; min-width: 140px; justify-content: center;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: linear-gradient(135deg, #2563eb, #6366f1); color: white; }
.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; }


/* 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) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    textarea { height: 250px; }
}