File size: 3,472 Bytes
3dbff6b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/* 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;
}