/* ── CSS Variables ── */
:root {
    --bg-color: #1a1a1a;
    --bg-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%232d2d2d' fill-opacity='0.1'%3E%3Crect x='0' y='0' width='100' height='100'/%3E%3C/g%3E%3C/svg%3E");
    --text-color: #e0e0e0;
    --container-bg: rgba(44, 44, 44, 0.5);
    --container-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
    --h1-color: #ffffff;
    --h1-shadow: 0 0 10px rgba(255,255,255,0.2);
    --toggle-bg: rgba(255,255,255,0.1);
    --toggle-hover-bg: rgba(255,255,255,0.2);
}

[data-theme="light"] {
    --bg-color: #f0f2f5;
    --bg-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%23cccccc' fill-opacity='0.2'%3E%3Crect x='0' y='0' width='100' height='100'/%3E%3C/g%3E%3C/svg%3E");
    --text-color: #222222;
    --container-bg: rgba(255, 255, 255, 0.75);
    --container-shadow: 0 10px 30px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.06);
    --h1-color: #111111;
    --h1-shadow: 0 0 10px rgba(0,0,0,0.08);
    --toggle-bg: rgba(0,0,0,0.08);
    --toggle-hover-bg: rgba(0,0,0,0.15);
}

body {
    background-color: var(--bg-color);
    background-image: var(--bg-image);
    color: var(--text-color);
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── Theme toggle button ── */
#theme-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    background: var(--toggle-bg);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
    z-index: 100;
}

#theme-toggle:hover {
    background: var(--toggle-hover-bg);
    transform: scale(1.1);
}

.container {
    text-align: center;
    background: var(--container-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--container-shadow);
    backdrop-filter: blur(10px);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

h1 {
    font-size: 2.5rem;
    color: var(--h1-color);
    text-shadow: var(--h1-shadow);
    transition: color 0.3s ease;
}

#generator-btn {
    background: linear-gradient(145deg, #f0943f, #e62f6b, #9c34a3, #4b44a4);
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1.1rem;
    margin: 20px 0 0 0;
    cursor: pointer;
    border-radius: 50px;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(230, 47, 107, 0.4);
}

#generator-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 47, 107, 0.6);
}

/* ── Contact link on main page ── */
.contact-link {
    display: inline-block;
    margin-top: 20px;
    color: #e62f6b;
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
.contact-link:hover { opacity: 1; }

/* ── Contact form page ── */
.form-container {
    text-align: left;
    max-width: 520px;
    width: 100%;
    margin: 60px auto;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #e62f6b;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
.back-link:hover { opacity: 1; }

.form-desc {
    color: var(--text-color);
    opacity: 0.7;
    margin: -10px 0 28px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.form-group label {
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--text-color);
    font-weight: 500;
}

.required { color: #e62f6b; }

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    padding: 10px 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
    outline: none;
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.15);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #e62f6b;
    background: rgba(230, 47, 107, 0.06);
}

.form-group select option { background: #1a1a1a; color: #e0e0e0; }
[data-theme="light"] .form-group select option { background: #fff; color: #222; }

.form-group textarea { resize: vertical; min-height: 120px; }

.submit-btn {
    width: 100%;
    background: linear-gradient(145deg, #f0943f, #e62f6b, #9c34a3, #4b44a4);
    color: white;
    padding: 14px;
    font-size: 1.05rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(230, 47, 107, 0.4);
}
.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 47, 107, 0.6);
}
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.form-status {
    margin-top: 14px;
    font-size: 0.95rem;
    text-align: center;
    min-height: 1.4em;
}
.form-status.success { color: #4caf50; }
.form-status.error   { color: #e62f6b; }
