/* drey.uk — earthy woodland theme from the-drey */
:root {
    --bark: #4a3728;
    --amber: #c48f3f;
    --moss: #5a7247;
    --cream: #faf6f0;
    --text: #3a2e24;
    --light-bark: #6b5344;
    --shadow: rgba(74, 55, 40, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--cream);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 520px;
    padding: 2rem;
    text-align: center;
}

h1 {
    font-family: 'Pacifico', cursive;
    font-size: 3rem;
    color: var(--bark);
    margin-bottom: 0.25rem;
}

h2 {
    font-family: 'Lora', serif;
    font-size: 1.4rem;
    color: var(--bark);
    margin-bottom: 1rem;
}

.tagline {
    color: var(--light-bark);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 1rem;
}

input[type="url"],
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0d8d0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    background: var(--cream);
    transition: border-color 0.2s;
    margin-bottom: 0.75rem;
}

input:focus {
    outline: none;
    border-color: var(--amber);
}

input[readonly] {
    background: #f5f0e8;
    cursor: text;
}

button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

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

#shorten-btn,
#login-btn {
    background-color: var(--moss);
    color: white;
    width: 100%;
}

#shorten-btn:hover,
#login-btn:hover {
    background-color: #4d6340;
}

#copy-btn {
    background-color: var(--amber);
    color: white;
    flex-shrink: 0;
    padding: 0.6rem 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#copy-btn:hover {
    background-color: #b0802e;
}

.secondary {
    background-color: #e0d8d0;
    color: var(--text);
}

.secondary:hover {
    background-color: #d0c8c0;
}

.result-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.result-row input {
    margin-bottom: 0;
    flex: 1;
}

.label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--light-bark);
    text-align: left;
}

.feedback {
    color: var(--moss);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.error {
    border-left: 4px solid #c44;
}

.error-text {
    color: #c44;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.hidden {
    display: none !important;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    width: 100%;
    max-width: 380px;
    margin: 1rem;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
}

.modal-actions button {
    flex: 1;
}

/* Extension banner */
.extension-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    color: var(--light-bark);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: color 0.2s;
}

.extension-banner:hover {
    color: var(--amber);
}

/* Footer */
footer {
    margin-top: auto;
    padding: 1.5rem;
    font-size: 0.85rem;
    color: var(--light-bark);
}

footer a {
    color: var(--amber);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}
