hindi-hate / static /style.css
yash3056's picture
Upload folder using huggingface_hub
ecf6723 verified
:root {
--primary: #6366f1;
--primary-dark: #4f46e5;
--secondary: #ec4899;
--bg-dark: #0f172a;
--card-bg: rgba(30, 41, 59, 0.7);
--text-light: #f8fafc;
--text-dim: #94a3b8;
--success: #10b981;
--danger: #ef4444;
--glass-border: rgba(255, 255, 255, 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Outfit', sans-serif;
background-color: var(--bg-dark);
color: var(--text-light);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
overflow-x: hidden;
position: relative;
}
/* Background Shapes */
.background-shapes {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
overflow: hidden;
}
.shape {
position: absolute;
filter: blur(100px);
opacity: 0.4;
animation: float 20s infinite ease-in-out;
}
.shape-1 {
width: 400px;
height: 400px;
background: var(--primary);
top: -100px;
left: -100px;
}
.shape-2 {
width: 300px;
height: 300px;
background: var(--secondary);
bottom: -50px;
right: -50px;
animation-delay: -5s;
}
.shape-3 {
width: 200px;
height: 200px;
background: #8b5cf6;
top: 40%;
left: 60%;
animation-delay: -10s;
}
@keyframes float {
0%, 100% { transform: translate(0, 0); }
50% { transform: translate(30px, -30px); }
}
.container {
width: 100%;
max-width: 800px;
padding: 2rem;
z-index: 1;
}
header {
text-align: center;
margin-bottom: 3rem;
}
h1 {
font-size: 3rem;
font-weight: 700;
background: linear-gradient(to right, #fff, #94a3b8);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 0.5rem;
}
.subtitle {
color: var(--text-dim);
font-size: 1.1rem;
}
.card {
background: var(--card-bg);
backdrop-filter: blur(16px);
border: 1px solid var(--glass-border);
border-radius: 1.5rem;
padding: 2rem;
margin-bottom: 2rem;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
}
.input-card:hover {
transform: translateY(-2px);
}
.input-wrapper {
position: relative;
margin-bottom: 1.5rem;
}
textarea {
width: 100%;
height: 150px;
background: rgba(15, 23, 42, 0.6);
border: 2px solid var(--glass-border);
border-radius: 1rem;
padding: 1rem;
color: var(--text-light);
font-family: 'Outfit', sans-serif;
font-size: 1.1rem;
resize: none;
transition: border-color 0.3s ease;
}
textarea:focus {
outline: none;
border-color: var(--primary);
}
.char-count {
position: absolute;
bottom: 1rem;
right: 1rem;
font-size: 0.8rem;
color: var(--text-dim);
}
.btn-primary {
width: 100%;
padding: 1rem;
background: linear-gradient(135deg, var(--primary), var(--secondary));
border: none;
border-radius: 1rem;
color: white;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
transition: opacity 0.3s ease, transform 0.2s ease;
display: flex;
justify-content: center;
align-items: center;
}
.btn-primary:hover {
opacity: 0.9;
transform: scale(1.02);
}
.btn-primary:active {
transform: scale(0.98);
}
.loader {
width: 20px;
height: 20px;
border: 3px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top-color: white;
animation: spin 1s ease-in-out infinite;
margin-left: 0.5rem;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.hidden {
display: none;
}
/* Result Card */
.result-card {
border-left: 5px solid transparent;
animation: slideUp 0.5s ease-out;
}
.result-card.hate {
border-left-color: var(--danger);
background: linear-gradient(to right, rgba(239, 68, 68, 0.1), transparent);
}
.result-card.non-hate {
border-left-color: var(--success);
background: linear-gradient(to right, rgba(16, 185, 129, 0.1), transparent);
}
.result-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
.confidence {
font-size: 0.9rem;
color: var(--text-dim);
background: rgba(0, 0, 0, 0.2);
padding: 0.25rem 0.75rem;
border-radius: 1rem;
}
.result-content {
display: flex;
align-items: center;
gap: 1rem;
}
.icon {
width: 50px;
height: 50px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
}
.hate .icon::before {
content: '⚠️';
}
.non-hate .icon::before {
content: '✅';
}
#resultLabel {
font-size: 1.5rem;
margin-bottom: 0.25rem;
}
.hate #resultLabel { color: var(--danger); }
.non-hate #resultLabel { color: var(--success); }
@keyframes slideUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
/* Examples */
.examples-section {
margin-top: 3rem;
}
.examples-section h3 {
margin-bottom: 1rem;
color: var(--text-dim);
font-weight: 400;
}
.examples-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
}
.example-chip {
background: rgba(255, 255, 255, 0.05);
border: 1px solid var(--glass-border);
padding: 1rem;
border-radius: 0.75rem;
cursor: pointer;
transition: all 0.3s ease;
font-size: 0.95rem;
color: var(--text-light);
}
.example-chip:hover {
background: rgba(255, 255, 255, 0.1);
border-color: var(--primary);
}
footer {
text-align: center;
margin-top: 3rem;
color: var(--text-dim);
font-size: 0.9rem;
}