body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fce4ec; /* Light pink background */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    text-align: center;
}

.container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 600px;
    width: 90%;
}

.checkbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
    gap: 12px;
}

.checkbox-container label {
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
    user-select: none;
}

/* Toggle Switch Styling */
.checkbox-container input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 50px;
    height: 26px;
    background: #e0e0e0;
    border-radius: 26px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: background 0.3s;
    /* Reset global input styles */
    margin: 0;
    padding: 0;
    border: none;
}

.checkbox-container input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.checkbox-container input[type="checkbox"]:checked {
    background: #d81b60;
}

.checkbox-container input[type="checkbox"]:checked::after {
    transform: translateX(24px);
}

#image-container {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#image-container img {
    max-width: 180px;
    max-height: 180px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    object-fit: cover;
}

h1 {
    color: #d81b60;
    margin-bottom: 1rem;
}

input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

button {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    transition: transform 0.1s;
    margin: 5px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

button:active {
    transform: scale(0.95);
}

.buttons {
    position: relative;
    min-height: 100px; /* Give space for the button to move around */
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
#create-btn, #open-dash-btn, #make-link-btn {
    background-color: #333;
    color: white;
    width: 100%;
}

#open-dash-btn {
    background-color: #2196F3; /* Blue color to distinguish it */
    margin-top: 5px;
}

#yes-btn {
    background-color: #4CAF50; /* Green */
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease-in-out;
}

#yes-btn.yes-btn-enlarged {
    transform: scale(1.2);
    font-size: 1.3rem;
}

#no-btn {
    background-color: #f44336; /* Red */
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.hidden {
    display: none;
}

#no-btn.moving {
    position: absolute;
    transition: top 0.2s ease-out, left 0.2s ease-out, width 0.2s, border-radius 0.2s;
}
.hidden {
    display: none;
}

#success-view h1.large-success-text {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 0;
}

/* --- Responsive Design for Mobile --- */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem 1rem; /* Reduce padding on small screens */
    }

    h1 {
        font-size: 1.6rem; /* Adjust base h1 size */
    }

    #success-view h1.large-success-text {
        font-size: 2rem; /* Make the big success text smaller */
    }

    button {
        padding: 10px 15px; /* Reduce button padding */
        font-size: 15px; /* Reduce button font size */
    }

    #yes-btn.yes-btn-enlarged {
        transform: scale(1.1); /* Slightly smaller enlargement */
        font-size: 1.2rem;
    }
}

/* --- Messages --- */
.form-error {
    color: #c62828;
    font-size: 0.9rem;
    margin: 0 0 10px;
}

.notice {
    font-size: 0.85rem;
    color: #8d6e00;
    background: #fff8e1;
    border-radius: 6px;
    padding: 8px 10px;
}

#error-view p {
    color: #555;
}

#retry-btn {
    background-color: #d81b60;
    color: white;
}

button:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Let the runaway button react to touch without the browser's double-tap zoom delay */
#no-btn {
    touch-action: manipulation;
}

/* --- Home and the private dashboard --- */
body.dash { align-items: flex-start; height: auto; min-height: 100vh; padding: 24px 0; }
.lead { color: #555; margin: 0 0 18px; }
.hint { font-size: 0.8rem; color: #666; margin: -6px 0 12px; }
h2 { color: #d81b60; font-size: 1.15rem; margin: 0; }
.private-box { background: #fff8e1; border: 1px solid #ffe082; border-radius: 10px; padding: 12px 14px; text-align: left; font-size: 0.9rem; color: #5d4600; }
.private-box p { margin: 0 0 6px; }
.row { display: flex; gap: 6px; align-items: center; }
.row input { margin: 4px 0; flex: 1; min-width: 0; font-size: 0.85rem; }
button.small { padding: 8px 12px; font-size: 14px; margin: 0; background: #333; color: white; flex: none; }
button.secondary { background: #e0e0e0; color: #333; }
button.danger { background: #fdecea; color: #c62828; }
.new-link { margin: 20px 0 8px; padding: 14px; border: 2px dashed #f8bbd0; border-radius: 12px; }
.list-head { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; }
.list-head h2 { margin-right: auto; }
#summary { font-size: 0.85rem; color: #666; }
.link-card { text-align: left; border: 1px solid #eee; border-left: 5px solid #bbb; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.link-card.yes { border-left-color: #4CAF50; background: #f1f8f1; }
.link-card.no { border-left-color: #f44336; background: #fdf3f2; }
.link-card.opened { border-left-color: #ff9800; }
.link-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.link-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: 0.8rem; padding: 3px 9px; border-radius: 999px; background: #eee; color: #555; white-space: nowrap; }
.badge.yes { background: #4CAF50; color: white; }
.badge.no { background: #f44336; color: white; }
.badge.opened { background: #fff3e0; color: #e65100; }
.meta { font-size: 0.8rem; color: #888; margin: 3px 0 2px; }
