voice-detector / frontend /styles.css
jawaduddin
Initial commit: AI Voice Detection System
8a6f58d
Raw History Blame Contribute Delete
15.6 kB
:root {
--bg-color: #ffffff;
--text-color: #1a202c;
--text-muted: #4a5568;
--nav-bg: #ffffff;
--nav-shadow: rgba(0, 0, 0, 0.05);
--card-bg: #ffffff;
--card-border: #f0f0f0;
--footer-bg: #ffffff;
--footer-divider: #e2e8f0;
--input-border: #e0e0e0;
--btn-secondary-bg: transparent;
--btn-secondary-text: #555;
--btn-secondary-hover: #f5f5f5;
--member-bg: #f8fafc;
--member-border: #f1f5f9;
}
body.dark {
--bg-color: #0f172a;
--text-color: #f1f5f9;
--text-muted: #94a3b8;
--nav-bg: #1e293b;
--nav-shadow: rgba(0, 0, 0, 0.3);
--card-bg: #1e293b;
--card-border: #334155;
--footer-bg: #0f172a;
--footer-divider: #334155;
--input-border: #334155;
--btn-secondary-bg: #334155;
--btn-secondary-text: #f1f5f9;
--btn-secondary-hover: #475569;
--member-bg: #334155;
--member-border: #475569;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background-color: var(--bg-color);
color: var(--text-color);
}
/* Theme Toggle Button */
.theme-toggle {
background: var(--btn-secondary-bg);
border: 1px solid var(--card-border);
color: var(--text-color);
width: 40px;
height: 40px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 18px;
transition: all 0.3s ease;
}
.theme-toggle:hover {
background: var(--btn-secondary-hover);
transform: translateY(-2px);
}
body.dark .theme-toggle i::before {
content: "\f185";
/* Sun icon */
}
/* Aggressive Dark Mode Overrides for Tailwind Utilities */
body.dark,
body.dark .bg-white,
body.dark .bg-gray-50,
body.dark .bg-blue-50,
body.dark [class*="bg-gradient-"] {
background: var(--bg-color) !important;
background-image: none !important;
}
body.dark .text-gray-900,
body.dark .text-gray-800,
body.dark .text-gray-700,
body.dark h1,
body.dark h2,
body.dark h3 {
color: var(--text-color) !important;
}
body.dark .text-gray-600,
body.dark .text-gray-500,
body.dark p {
color: var(--text-muted) !important;
}
body.dark .border-gray-200,
body.dark .border-gray-100 {
border-color: var(--card-border) !important;
}
body.dark .shadow-sm,
body.dark .shadow-md,
body.dark .shadow-lg {
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}
/* Feature card and container specific overrides */
body.dark .feature-card,
body.dark .bg-white.rounded-2xl,
body.dark [class*="rounded-xl"],
body.dark [class*="rounded-2xl"],
body.dark .explainability-panel {
background-color: var(--card-bg) !important;
border-color: var(--card-border) !important;
}
/* Details and Summary overrides */
body.dark .explanation-content {
background-color: var(--card-bg) !important;
border-color: var(--card-border) !important;
}
body.dark .explanation-item strong {
color: var(--text-color) !important;
}
body.dark .explanation-item p {
color: var(--text-muted) !important;
}
body.dark .explainability-panel summary {
color: var(--text-color) !important;
}
/* Navigation specific override */
body.dark nav {
background-color: var(--nav-bg) !important;
border-color: var(--card-border) !important;
}
/* Smooth Fade-in Animation */
.fade-in {
animation: fadeIn 0.6s ease-in;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Slide-in Animation */
.slide-in {
animation: slideIn 0.5s ease-out;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateX(-30px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
/* Page Transition */
.page-transition {
transition: opacity 0.3s ease-in-out;
}
/* Custom Scrollbar */
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #888;
border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
background: #555;
}
/* Hover Effects */
.hover-lift {
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
/* Button Ripple Effect */
button,
.btn {
position: relative;
overflow: hidden;
}
button::after,
.btn::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
border-radius: 50%;
background: rgba(255, 255, 255, 0.5);
transform: translate(-50%, -50%);
transition: width 0.6s, height 0.6s;
}
button:active::after,
.btn:active::after {
width: 300px;
height: 300px;
}
/* Loading Spinner */
.spinner {
border: 3px solid #f3f3f3;
border-top: 3px solid #3b82f6;
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* Pulse Animation */
.pulse {
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
/* Gradient Text */
.gradient-text {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
/* Card Hover Effect */
.card-hover {
transition: all 0.3s ease;
}
.card-hover:hover {
transform: translateY(-5px);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
/* Progress Bar and Confidence Styles */
.confidence-bar {
width: 100%;
height: 24px;
background: #e0e0e0;
border-radius: 12px;
overflow: hidden;
margin: 15px 0;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}
.confidence-fill {
height: 100%;
width: 0%;
transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
background-size: 20px 20px;
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
animation: stripe-move 2s linear infinite;
}
@keyframes stripe-move {
0% {
background-position: 0 0;
}
100% {
background-position: 40px 0;
}
}
.confidence-human {
background-color: #4caf50;
background: linear-gradient(90deg, #4caf50, #81c784);
}
.confidence-ai {
background-color: #f44336;
background: linear-gradient(90deg, #f44336, #e57373);
}
/* Explainability Panel */
.explainability-panel {
background: #f8f9fa;
border-radius: 8px;
border: 1px solid #e9ecef;
margin-top: 20px;
}
.explainability-panel summary {
padding: 15px;
cursor: pointer;
font-weight: 600;
color: #495057;
list-style: none;
display: flex;
align-items: center;
justify-content: space-between;
}
.explainability-panel summary::after {
content: '\f078';
/* FontAwesome generic chevron down */
font-family: 'Font Awesome 6 Free';
font-weight: 900;
transition: transform 0.3s;
}
.explainability-panel[open] summary::after {
transform: rotate(180deg);
}
.explanation-content {
padding: 15px;
border-top: 1px solid #e9ecef;
background: white;
border-radius: 0 0 8px 8px;
}
.explanation-item {
margin-bottom: 15px;
padding-bottom: 15px;
border-bottom: 1px dashed #e9ecef;
}
.explanation-item:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}
.explanation-item strong {
display: block;
color: #333;
margin-bottom: 5px;
font-size: 14px;
}
.explanation-item p {
color: #666;
font-size: 14px;
line-height: 1.5;
}
/* Error Messages */
.error-message {
background: #ffebee;
border-left: 4px solid #f44336;
padding: 16px;
margin: 16px 0;
border-radius: 4px;
color: #c62828;
font-size: 14px;
box-shadow: 0 2px 8px rgba(244, 67, 54, 0.1);
display: none;
/* Hidden by default */
}
/* Drag and Drop Zone */
#dropZone {
transition: all 0.3s ease;
border: 2px dashed #cbd5e1;
}
#dropZone.drag-over {
border-color: #3b82f6 !important;
background-color: #eff6ff !important;
transform: scale(1.02);
}
/* Smooth Link Transitions */
a {
transition: all 0.2s ease;
}
/* Focus Styles */
button:focus,
input:focus,
a:focus {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}
/* Navigation Styles */
.nav-container {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 40px;
background: var(--nav-bg);
box-shadow: 0 2px 10px var(--nav-shadow);
position: sticky;
top: 0;
z-index: 100;
}
.logo {
display: flex;
align-items: center;
font-size: 24px;
font-weight: 800;
color: var(--text-color);
}
.logo i {
margin-right: 10px;
font-size: 28px;
}
.nav-links {
display: flex;
gap: 15px;
align-items: center;
}
.btn-secondary {
background: var(--btn-secondary-bg);
color: var(--btn-secondary-text);
padding: 10px 20px;
border-radius: 8px;
text-decoration: none;
font-weight: 600;
border: 1px solid var(--card-border);
transition: all 0.3s;
}
.btn-secondary:hover {
color: var(--text-color);
background: var(--btn-secondary-hover);
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 10px 24px;
border-radius: 8px;
text-decoration: none;
font-weight: 600;
transition: transform 0.2s, box-shadow 0.2s;
border: none;
cursor: pointer;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.btn-lg {
padding: 15px 35px;
font-size: 18px;
}
/* Hero Section */
.hero {
display: flex;
align-items: center;
justify-content: space-between;
padding: 60px 40px;
min-height: 85vh;
background: radial-gradient(circle at top right, #f3f4fa 0%, #fff 40%);
overflow: hidden;
}
.hero-content {
max-width: 600px;
}
.hero h1 {
font-size: 56px;
line-height: 1.1;
margin-bottom: 24px;
color: var(--text-color);
font-weight: 800;
}
.hero p {
font-size: 20px;
color: var(--text-muted);
margin-bottom: 40px;
line-height: 1.6;
}
.hero-buttons {
display: flex;
gap: 20px;
}
.hero-visual {
position: relative;
width: 500px;
height: 400px;
display: flex;
align-items: center;
justify-content: center;
}
.waveform-visual {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
height: 200px;
}
.bar {
width: 12px;
background: #667eea;
border-radius: 50px;
animation: wave 1.2s ease-in-out infinite;
}
@keyframes wave {
0%,
100% {
height: 20%;
background: #667eea;
}
50% {
height: 100%;
background: #764ba2;
}
}
.bar:nth-child(even) {
animation-duration: 1.5s;
}
.bar:nth-child(odd) {
animation-duration: 1.1s;
}
/* Features Section */
.features {
padding: 80px 40px;
background: var(--bg-color);
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 40px;
max-width: 1200px;
margin: 0 auto;
}
.feature-card {
padding: 40px;
background: var(--card-bg);
border-radius: 20px;
border: 1px solid var(--card-border);
transition: all 0.3s;
}
.icon-box {
width: 60px;
height: 60px;
background: #f0f4ff;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 24px;
color: #667eea;
font-size: 24px;
}
.feature-card h3 {
font-size: 22px;
margin-bottom: 12px;
color: var(--text-color);
}
.feature-card p {
color: var(--text-muted);
line-height: 1.6;
}
/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
.fade-in {
animation-duration: 0.4s;
}
h1 {
font-size: 2rem !important;
}
.text-5xl {
font-size: 2.5rem !important;
}
.nav-container {
padding: 15px 20px;
flex-direction: column;
gap: 15px;
}
.nav-links {
width: 100%;
justify-content: center;
}
.hero {
flex-direction: column;
text-align: center;
padding: 40px 20px;
}
.hero-buttons {
flex-direction: column;
width: 100%;
gap: 10px;
}
.hero-buttons .btn {
width: 100%;
justify-content: center;
}
.hero-visual {
margin-top: 50px;
width: 100%;
height: auto;
}
.features-grid {
grid-template-columns: 1fr;
gap: 20px;
}
}
/* Base Accessibility & Responsiveness */
html,
body {
max-width: 100vw;
overflow-x: hidden;
}
button,
.btn {
min-height: 48px;
display: inline-flex;
align-items: center;
justify-content: center;
}
input,
select,
textarea {
font-size: 16px !important;
/* Prevents iOS zoom on focus */
}
/* Fix for large SVGs without Tailwind */
svg {
max-width: 100%;
height: auto;
}
/* Team Footer Styles */
.team-footer {
background: var(--footer-bg);
padding: 60px 20px 40px;
text-align: center;
width: 100%;
}
.footer-divider {
height: 1px;
background: linear-gradient(90deg, transparent, var(--footer-divider), transparent);
margin-bottom: 40px;
max-width: 1200px;
margin-left: auto;
margin-right: auto;
}
.team-name {
font-size: 32px;
font-weight: 800;
margin-bottom: 12px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.footer-content h3 {
font-size: 14px;
text-transform: uppercase;
letter-spacing: 2px;
color: var(--text-muted);
margin-bottom: 24px;
font-weight: 700;
}
.team-members {
display: flex;
justify-content: center;
gap: 40px;
flex-wrap: wrap;
margin-bottom: 30px;
}
.member {
display: flex;
align-items: center;
gap: 12px;
background: var(--member-bg);
padding: 12px 20px;
border-radius: 12px;
border: 1px solid var(--member-border);
transition: all 0.3s ease;
}
.member:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
border-color: #667eea;
}
.member .name {
font-weight: 600;
color: var(--text-color);
font-size: 16px;
}
.member a {
color: #0077b5;
font-size: 20px;
display: flex;
align-items: center;
transition: transform 0.2s ease;
}
.member a:hover {
transform: scale(1.1);
}
.footer-note {
font-size: 13px;
color: #94a3b8;
margin-top: 20px;
}
@media (max-width: 640px) {
.team-members {
flex-direction: column;
align-items: center;
gap: 15px;
}
.member {
width: 100%;
max-width: 300px;
justify-content: space-between;
}
}
/* Print Styles */
@media print {
nav,
footer,
button,
.team-footer {
display: none;
}
}