detektor-hoax-app / style.css
DeryFerd's picture
Upload 7 files
3dbff6b verified
/* style.css (Versi Perbaikan Final) */
/* CSS Variables untuk warna agar mudah diubah */
:root {
--bg-color: #f0f2f5;
--card-bg: white;
--text-color: #333;
--subtitle-color: #606770;
--primary-blue: #1877f2;
--blue-hover: #166fe5;
--border-color: #dddfe2;
}
body {
font-family: 'Poppins', sans-serif;
background-color: var(--bg-color);
color: var(--text-color);
display: flex;
flex-direction: column;
min-height: 100vh;
margin: 0;
}
header {
background-color: var(--card-bg);
color: var(--primary-blue);
text-align: center;
padding: 1rem 0;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
width: 100%;
}
header h1 {
margin: 0;
font-weight: 700;
}
/* 'main' HANYA bertugas untuk mengisi ruang dan menengahkan 'card' */
main {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
padding: 2rem;
width: 100%;
box-sizing: border-box;
}
/* 'card' berisi semua konten dan mengatur dirinya sendiri */
.card {
background-color: var(--card-bg);
padding: 2.5rem 3.5rem;
border-radius: 16px;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
text-align: center;
max-width: 550px;
width: 100%;
border: 1px solid #e7e7e7;
}
.card .subtitle {
font-size: 0.9rem;
color: var(--subtitle-color);
margin-top: -1rem;
margin-bottom: 2rem;
}
/* --- Desain Form Elements --- */
textarea {
width: 100%;
padding: 1rem;
border: 2px solid var(--border-color);
border-radius: 8px;
font-size: 1rem;
font-family: 'Poppins', sans-serif;
margin-bottom: 1.5rem;
resize: vertical;
box-sizing: border-box; /* Important for padding and width */
transition: border-color 0.3s, box-shadow 0.3s;
}
textarea:focus {
outline: none;
border-color: var(--primary-blue);
box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.2);
}
button {
background-color: var(--primary-blue);
color: white;
border: none;
padding: 1rem 2rem;
border-radius: 8px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease-in-out;
box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3);
margin-bottom: 1rem;
}
button:hover {
background-color: var(--blue-hover);
transform: translateY(-2px);
box-shadow: 0 6px 15px rgba(24, 119, 242, 0.4);
}
button:active {
transform: translateY(0);
box-shadow: 0 2px 5px rgba(24, 119, 242, 0.3);
}
/* --- Area Hasil & Footer --- */
#resultContainer {
margin-top: 1.5rem;
}
#resultArea {
font-size: 1.2rem;
font-weight: 600;
color: #1c1e21;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-10px); }
to { opacity: 1; transform: translateY(0); }
}
#resultArea.fade-in {
animation: fadeIn 0.5s ease-in-out;
}
.spinner {
border: 4px solid rgba(0, 0, 0, 0.1);
width: 36px;
height: 36px;
border-radius: 50%;
border-left-color: var(--primary-blue);
animation: spin 1s ease infinite;
margin: 1.5rem auto; /* Beri margin agar tidak terlalu dekat */
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
footer {
background-color: #333;
color: white;
text-align: center;
padding: 1rem 0;
width: 100%;
font-size: 0.9rem;
}