Spaces:
Runtime error
Runtime error
Download static/index.css from Tophet12/deepfake-detector: direct link, hf CLI and curl.
- Browser
- Download file 10.6 kB
-
https://huggingface.co/spaces/Tophet12/deepfake-detector/resolve/main/static/index.css
- Command line
-
hf download hf://spaces/Tophet12/deepfake-detector/static/index.css
-
curl -L -o index.css https://huggingface.co/spaces/Tophet12/deepfake-detector/resolve/main/static/index.css
10.6 kB
| /* --- CSS Variables & Reset --- */ | |
| :root { | |
| --primary-color: #6a11cb; | |
| --secondary-color: #2575fc; | |
| --accent-green: #28a745; | |
| --accent-red: #dc3545; | |
| --bg-gradient: linear-gradient(135deg, #f3e7e9 0%, #e3eeff 100%); | |
| --card-bg: #ffffff; | |
| --text-color: #333333; | |
| --text-muted: #666666; | |
| --border-radius: 12px; | |
| --shadow: 0 8px 30px rgba(0, 0, 0, 0.08); | |
| --transition: all 0.3s ease; | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; | |
| } | |
| body { | |
| background: var(--bg-gradient); | |
| color: var(--text-color); | |
| min-height: 100vh; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| /* --- Navigation --- */ | |
| nav { | |
| background: rgba(255, 255, 255, 0.9); | |
| backdrop-filter: blur(10px); | |
| padding: 1rem 2rem; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); | |
| position: sticky; | |
| top: 0; | |
| z-index: 1000; | |
| } | |
| .logo { | |
| font-size: 1.5rem; | |
| font-weight: 700; | |
| background: linear-gradient(to right, var(--primary-color), var(--secondary-color)); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| } | |
| .nav-links { | |
| display: flex; | |
| gap: 1.5rem; | |
| } | |
| .nav-links a { | |
| text-decoration: none; | |
| color: var(--text-color); | |
| font-weight: 500; | |
| transition: var(--transition); | |
| cursor: pointer; | |
| } | |
| .nav-links a:hover, | |
| .nav-links a.active { | |
| color: var(--secondary-color); | |
| } | |
| /* --- Main Content --- */ | |
| main { | |
| flex: 1; | |
| max-width: 1200px; | |
| margin: 2rem auto; | |
| padding: 0 1.5rem; | |
| width: 100%; | |
| } | |
| /* --- Tabs --- */ | |
| .tabs-container { | |
| display: flex; | |
| justify-content: center; | |
| margin-bottom: 2.5rem; | |
| background: #fff; | |
| padding: 0.5rem; | |
| border-radius: 50px; | |
| width: fit-content; | |
| margin-left: auto; | |
| margin-right: auto; | |
| box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03); | |
| flex-wrap: wrap; | |
| } | |
| .tab-btn { | |
| padding: 0.8rem 1.5rem; | |
| border: none; | |
| background: transparent; | |
| cursor: pointer; | |
| font-size: 1rem; | |
| font-weight: 600; | |
| color: var(--text-muted); | |
| border-radius: 40px; | |
| transition: var(--transition); | |
| } | |
| .tab-btn.active { | |
| background: var(--primary-color); | |
| color: white; | |
| box-shadow: 0 4px 10px rgba(106, 17, 203, 0.3); | |
| } | |
| /* --- Tool Interface Layout --- */ | |
| .tool-container { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: 2rem; | |
| background: var(--card-bg); | |
| padding: 2rem; | |
| border-radius: var(--border-radius); | |
| box-shadow: var(--shadow); | |
| min-height: 500px; | |
| } | |
| @media (max-width: 768px) { | |
| .tool-container { | |
| grid-template-columns: 1fr; | |
| } | |
| .tabs-container { | |
| width: 100%; | |
| justify-content: center; | |
| } | |
| } | |
| /* --- Upload Section (Shared) --- */ | |
| .upload-section { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1.5rem; | |
| } | |
| .drop-zone { | |
| border: 2px dashed #cbd5e0; | |
| border-radius: var(--border-radius); | |
| padding: 3rem 1.5rem; | |
| text-align: center; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| background: #f8f9fa; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| min-height: 250px; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .drop-zone:hover, | |
| .drop-zone.drag-over { | |
| border-color: var(--secondary-color); | |
| background: #f0f4ff; | |
| } | |
| .drop-zone i { | |
| font-size: 3rem; | |
| color: var(--text-muted); | |
| margin-bottom: 1rem; | |
| } | |
| .drop-zone p { | |
| color: var(--text-muted); | |
| margin-bottom: 0.5rem; | |
| } | |
| .drop-zone .file-info { | |
| font-size: 0.9rem; | |
| color: #888; | |
| } | |
| .file-preview { | |
| max-width: 100%; | |
| max-height: 200px; | |
| border-radius: 8px; | |
| margin-top: 1rem; | |
| display: none; | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
| } | |
| .audio-preview, | |
| .video-preview { | |
| max-width: 100%; | |
| margin-top: 1rem; | |
| display: none; | |
| } | |
| input[type="file"] { | |
| display: none; | |
| } | |
| .button-row { | |
| display: flex; | |
| gap: 1rem; | |
| } | |
| .btn-detect { | |
| background: linear-gradient(to right, var(--primary-color), var(--secondary-color)); | |
| color: white; | |
| border: none; | |
| padding: 1rem; | |
| border-radius: 8px; | |
| font-size: 1.1rem; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| flex: 1; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 0.5rem; | |
| } | |
| .btn-detect:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 5px 15px rgba(37, 117, 252, 0.4); | |
| } | |
| .btn-detect:disabled { | |
| background: #ccc; | |
| cursor: not-allowed; | |
| transform: none; | |
| box-shadow: none; | |
| } | |
| .btn-reset { | |
| background: #f8f9fa; | |
| color: #555; | |
| border: 2px solid #e9ecef; | |
| padding: 1rem; | |
| border-radius: 8px; | |
| font-size: 1.1rem; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| flex: 1; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 0.5rem; | |
| } | |
| .btn-reset:hover { | |
| background: #e2e6ea; | |
| border-color: #dae0e5; | |
| } | |
| /* --- Results & Info Section --- */ | |
| .info-section { | |
| background: #fdfdfd; | |
| border-radius: var(--border-radius); | |
| padding: 1rem; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .section-title { | |
| font-size: 1.1rem; | |
| font-weight: 600; | |
| margin-bottom: 1rem; | |
| color: #444; | |
| border-left: 4px solid var(--secondary-color); | |
| padding-left: 0.5rem; | |
| } | |
| .result-box { | |
| display: none; | |
| background: white; | |
| border: 1px solid #eee; | |
| border-radius: 8px; | |
| padding: 1.5rem; | |
| text-align: center; | |
| margin-bottom: 2rem; | |
| animation: fadeIn 0.5s ease; | |
| } | |
| .result-badge { | |
| font-size: 1.2rem; | |
| font-weight: 700; | |
| padding: 0.5rem 1.5rem; | |
| border-radius: 50px; | |
| display: inline-block; | |
| margin-bottom: 1rem; | |
| } | |
| .result-fake { | |
| background-color: rgba(220, 53, 69, 0.1); | |
| color: var(--accent-red); | |
| border: 1px solid var(--accent-red); | |
| } | |
| .result-real { | |
| background-color: rgba(40, 167, 69, 0.1); | |
| color: var(--accent-green); | |
| border: 1px solid var(--accent-green); | |
| } | |
| .confidence-score { | |
| font-size: 2rem; | |
| font-weight: 700; | |
| color: var(--text-color); | |
| } | |
| .confidence-label { | |
| color: var(--text-muted); | |
| font-size: 0.9rem; | |
| } | |
| .examples-grid { | |
| display: grid; | |
| grid-template-columns: repeat(2, 1fr); | |
| gap: 1rem; | |
| margin-top: 1rem; | |
| } | |
| .example-card { | |
| background: white; | |
| border-radius: 8px; | |
| overflow: hidden; | |
| border: 1px solid #eee; | |
| } | |
| .example-card img { | |
| width: 100%; | |
| height: 100px; | |
| object-fit: cover; | |
| } | |
| .example-label { | |
| padding: 0.5rem; | |
| text-align: center; | |
| font-size: 0.8rem; | |
| font-weight: 600; | |
| } | |
| .label-fake { | |
| color: var(--accent-red); | |
| } | |
| .label-real { | |
| color: var(--accent-green); | |
| } | |
| /* --- Dashboard Cards (Detection Tools Tab) --- */ | |
| .dashboard-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |
| gap: 2rem; | |
| margin-top: 1rem; | |
| } | |
| .dash-card { | |
| background: white; | |
| padding: 2rem; | |
| border-radius: 16px; | |
| box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); | |
| text-align: center; | |
| transition: var(--transition); | |
| cursor: pointer; | |
| border: 1px solid transparent; | |
| } | |
| .dash-card:hover { | |
| transform: translateY(-5px); | |
| border-color: var(--secondary-color); | |
| box-shadow: 0 10px 25px rgba(37, 117, 252, 0.15); | |
| } | |
| .dash-icon { | |
| font-size: 3rem; | |
| color: var(--secondary-color); | |
| margin-bottom: 1rem; | |
| } | |
| .dash-card h3 { | |
| margin-bottom: 0.5rem; | |
| color: var(--text-color); | |
| } | |
| .dash-card p { | |
| color: var(--text-muted); | |
| font-size: 0.95rem; | |
| margin-bottom: 1.5rem; | |
| } | |
| .btn-go { | |
| background: transparent; | |
| color: var(--primary-color); | |
| border: 2px solid var(--primary-color); | |
| padding: 0.5rem 1.5rem; | |
| border-radius: 50px; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| } | |
| .dash-card:hover .btn-go { | |
| background: var(--primary-color); | |
| color: white; | |
| } | |
| /* --- Home Tab Styling --- */ | |
| .hero-section { | |
| text-align: center; | |
| padding: 4rem 1rem; | |
| background: white; | |
| border-radius: var(--border-radius); | |
| box-shadow: var(--shadow); | |
| margin-bottom: 2rem; | |
| } | |
| .hero-title { | |
| font-size: 3rem; | |
| background: linear-gradient(to right, var(--primary-color), var(--secondary-color)); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| margin-bottom: 1.5rem; | |
| } | |
| .hero-text { | |
| max-width: 700px; | |
| margin: 0 auto 2rem; | |
| font-size: 1.2rem; | |
| line-height: 1.6; | |
| color: var(--text-muted); | |
| } | |
| .features-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); | |
| gap: 2rem; | |
| } | |
| .feature-item { | |
| text-align: center; | |
| } | |
| .feature-item i { | |
| font-size: 2.5rem; | |
| color: var(--accent-green); | |
| margin-bottom: 1rem; | |
| } | |
| /* --- Video Visualizer Animation --- */ | |
| .visualizer-container { | |
| margin-top: 2rem; | |
| height: 200px; | |
| background: #222; | |
| border-radius: 8px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| overflow: hidden; | |
| position: relative; | |
| } | |
| .visualizer-bar { | |
| width: 8px; | |
| background: var(--secondary-color); | |
| margin: 0 4px; | |
| border-radius: 4px; | |
| animation: bounce 1s infinite ease-in-out; | |
| } | |
| @keyframes bounce { | |
| 0%, | |
| 100% { | |
| height: 20px; | |
| opacity: 0.5; | |
| } | |
| 50% { | |
| height: 140px; | |
| opacity: 1; | |
| box-shadow: 0 0 10px var(--secondary-color); | |
| } | |
| } | |
| /* Footer */ | |
| footer { | |
| text-align: center; | |
| padding: 2rem; | |
| color: var(--text-muted); | |
| font-size: 0.9rem; | |
| border-top: 1px solid rgba(0, 0, 0, 0.05); | |
| background: rgba(255, 255, 255, 0.6); | |
| margin-top: auto; | |
| } | |
| /* Utility */ | |
| .hidden { | |
| display: none ; | |
| } | |
| .show { | |
| display: block ; | |
| } | |
| @keyframes fadeIn { | |
| from { | |
| opacity: 0; | |
| transform: translateY(10px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } | |
| @keyframes spin { | |
| to { | |
| transform: rotate(360deg); | |
| } | |
| } | |
| .spinner { | |
| display: inline-block; | |
| 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; | |
| } | |
| /* Toast */ | |
| .toast { | |
| position: fixed; | |
| bottom: 20px; | |
| right: 20px; | |
| background: #333; | |
| color: white; | |
| padding: 12px 24px; | |
| border-radius: 8px; | |
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); | |
| opacity: 0; | |
| transform: translateY(20px); | |
| transition: all 0.3s ease; | |
| z-index: 2000; | |
| } | |
| .toast.show { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } |