-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexperiment.css
More file actions
109 lines (97 loc) · 2.2 KB
/
experiment.css
File metadata and controls
109 lines (97 loc) · 2.2 KB
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
/* Full viewport centering */
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100vh;
overflow: hidden;
}
/* Center container on screen */
#word-container {
display: flex;
justify-content: center;
align-items: center;
width: 100vw;
height: 100vh;
}
/* Drop zone circle */
#drop-zone {
width: 600px;
height: 600px;
border: 3px dashed gray;
border-radius: 50%;
background-color: #f9f9f9;
position: relative; /* words positioned relative to this */
}
/* Active state when a draggable is over the circle */
#drop-zone.drop-zone-active {
border-color: #0a0; /* green border */
border-style: solid;
box-shadow: 0 0 0 10px rgba(0,150,0,0.15);
}
/* Words */
.word {
position: absolute;
font-size: 14px;
font-family: sans-serif;
cursor: grab;
user-select: none;
background-color: white;
border: 1px solid #ccc;
border-radius: 4px;
padding: 3px 6px;
margin: 0;
white-space: nowrap;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
transform: translate(-50%, -50%); /* Center each word on its exact position */
}
.word.selected {
background-color: #add8e6; /* click selection highlight */
border-color: #4a9ede;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.word.dragging {
opacity: 0.5;
}
/* Controls area: fixed to top-right so it doesn't overlap with the circle */
#controls {
position: fixed;
top: 20px;
right: 20px;
z-index: 2000;
background: rgba(255,255,255,0.95);
padding: 8px 12px;
border-radius: 6px;
box-shadow: 0 4px 12px rgba(0,0,0,0.12);
text-align: center;
}
#finish-btn {
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
padding: 8px 12px;
font-size: 14px;
cursor: pointer;
}
#finish-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
#status-msg { min-height: 1.2em; margin-top:6px; }
/* Fullscreen overlay shown on successful finish */
#finish-overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: white;
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
flex-direction: column;
}
#finish-overlay h1 { color: #1a6f1a; margin-bottom: 12px; }
#finish-overlay button { margin-top: 12px; padding: 10px 14px; font-size: 16px; }