Spaces:
Running
Running
File size: 5,737 Bytes
10412e5 9488cf2 10412e5 9488cf2 10412e5 9488cf2 10412e5 9488cf2 10412e5 9488cf2 10412e5 9488cf2 10412e5 9488cf2 10412e5 |
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 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
:root {
--phone-body-color: #e0dacd; /* Creamy beige */
--dial-plate-bg: linear-gradient(145deg, #d3cabd, #f8f5ee); /* Subtle gradient */
--dial-plate-border: #a89d8a;
--hole-color: #5c554a; /* Dark brown */
--number-color: #403a30;
--finger-stop-color: #b0a492; /* Metallic-ish stop */
--finger-stop-border: #7d7365;
--display-bg: #4a443b; /* Dark display */
--display-text: #ffc107; /* Amber text */
--button-bg: #795548; /* Brown */
--button-text: #ffffff;
--dial-size: 300px; /* Slightly larger */
--hole-size: calc(var(--dial-size) * 0.13);
--number-font-size: calc(var(--dial-size) * 0.075); /* Slightly smaller number */
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #f0ece3; /* Light background */
font-family: 'Orbitron', sans-serif; /* Techy font */
overflow: hidden; /* Prevent scrollbars during drag */
user-select: none; /* Prevent text selection during drag */
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
.phone-body {
background-color: var(--phone-body-color);
padding: 35px;
border-radius: 20px;
box-shadow: 8px 8px 20px rgba(0,0,0,0.25),
inset 0 0 15px rgba(255,255,255,0.3),
inset 0 0 10px rgba(0,0,0,0.1);
display: flex;
flex-direction: column;
align-items: center;
}
.display-panel {
display: flex;
align-items: stretch; /* Make items same height */
width: 90%;
max-width: 320px;
height: 50px;
border-radius: 8px;
overflow: hidden; /* Clip corners */
margin-bottom: 35px;
background-color: var(--display-bg);
box-shadow: inset 3px 3px 8px rgba(0,0,0,0.5);
}
#dialed-numbers {
flex-grow: 1; /* Take available space */
color: var(--display-text);
font-size: 2em;
padding: 5px 15px;
display: flex;
align-items: center;
justify-content: flex-end; /* Numbers align right */
letter-spacing: 3px;
text-shadow: 0 0 5px rgba(255, 193, 7, 0.5); /* Glow effect */
overflow: hidden; /* Prevent long numbers breaking layout */
white-space: nowrap;
}
#call-button {
flex-shrink: 0; /* Don't shrink */
width: 60px; /* Fixed width */
background-color: var(--button-bg);
color: var(--button-text);
border: none;
border-left: 2px solid rgba(0,0,0,0.2);
cursor: pointer;
font-size: 1.5em;
display: flex;
justify-content: center;
align-items: center;
transition: background-color 0.2s;
}
#call-button:hover {
background-color: #9c786c;
}
.dial-assembly {
position: relative;
width: var(--dial-size);
height: var(--dial-size);
}
#dial {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: var(--dial-plate-bg);
border-radius: 50%;
border: 4px solid var(--dial-plate-border);
box-shadow: inset 0 0 15px rgba(0,0,0,0.2), 0 5px 10px rgba(0,0,0,0.2);
transform-origin: center center;
/* This transition controls the visual return speed */
transition: transform 0.55s cubic-bezier(0.15, 0.85, 0.25, 1);
}
.dial-center-design {
position: absolute;
width: 25%;
height: 25%;
top: 50%;
left: 50%;
background: radial-gradient(circle, #c8bba8 0%, var(--finger-stop-color) 100%);
border-radius: 50%;
transform: translate(-50%, -50%);
box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), 0 0 3px rgba(0,0,0,0.2);
z-index: 3; /* Above holes/numbers */
}
.hole {
position: absolute;
width: var(--hole-size);
height: var(--hole-size);
background-color: var(--hole-color);
border-radius: 50%;
top: 50%; /* Position origin for transform */
left: 50%;
/* Center the hole using negative margins */
margin-left: calc(var(--hole-size) / -2);
margin-top: calc(var(--hole-size) / -2);
cursor: grab;
z-index: 2; /* Above numbers */
box-shadow: inset 2px 2px 4px rgba(0,0,0,0.6);
/* Actual position set by JS translate */
}
.hole.dragging {
cursor: grabbing;
background-color: #7a7061; /* Lighter when dragging */
}
.dial-plate-number {
position: absolute;
/* Define area based on font size for centering */
width: calc(var(--number-font-size) * 1.5);
height: calc(var(--number-font-size) * 1.5);
top: 50%; /* Position origin for transform */
left: 50%;
/* Translate -50% of element size to center it on calculated point */
transform: translate(-50%, -50%);
display: flex;
justify-content: center;
align-items: center;
font-size: var(--number-font-size);
font-weight: 700;
color: var(--number-color);
z-index: 1; /* Below holes */
transform-origin: center center; /* Rotation point for text */
/* Final position and text rotation set by JS */
}
#finger-stop {
position: absolute;
width: 18px;
height: 45px;
background: linear-gradient(to bottom, #cac0b2, var(--finger-stop-color));
border: 1px solid var(--finger-stop-border);
border-radius: 9px 9px 5px 5px; /* Shaped top/bottom */
box-shadow: 1px 1px 4px rgba(0,0,0,0.5);
z-index: 4; /* Above everything */
/* Position & Rotation set by JS */
}
#clear-button {
margin-top: 30px;
padding: 10px 25px;
font-size: 1em;
background-color: var(--button-bg);
color: var(--button-text);
border: none;
border-radius: 5px;
cursor: pointer;
box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
transition: background-color 0.2s, transform 0.1s;
}
#clear-button:hover {
background-color: #9c786c;
}
#clear-button:active {
transform: translateY(1px);
box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
} |