/* Define color variables */
:root {
    --primary-color: #007BFF;
    --danger-color: #d9534f;
    --success-bg: #e6f7ff;
    --danger-bg: #fff5f5;
    --text-color-dark: #333;
    --text-color-light: #666;
}

/* Base reset and common styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.subscription, .response-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    font-size: 24px;
    color: var(--text-color-dark);
}

img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

h3 {
    font-size: 20px;
    color: #555;
}

p {
    font-size: 16px;
    color: var(--text-color-light);
    margin-bottom: 20px;
}

.submit-unsubscribe,
.submit-subscribe {
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    width: 100%;
    margin-bottom: 10px;
}

.submit-unsubscribe {
    background-color: var(--danger-color);
}

.submit-unsubscribe:hover {
    background-color: #c9302c;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.submit-subscribe {
    background-color: var(--primary-color);
}

.submit-subscribe:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.submit-unsubscribe:focus, 
.submit-subscribe:focus {
    outline: 2px solid #0056b3;
    outline-offset: 3px;
}

.unsubscription-form {
    display: flex;
    flex-direction: column;
}

/* Footer Styling */
.footer {
    background-color: #add8e6;
    color: #003366;
    text-align: center;
    padding: 20px;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.footer p {
    margin: 0;
    font-size: 14px;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--danger-color);
}

/* Responsive Design */
@media (max-width: 600px) {
    .footer {
        padding: 15px;
    }

    .footer p {
        font-size: 12px;
    }
}

/* Response container styling */
.response-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    padding: 40px 20px;
    text-align: center;
    transition: background-color 0.3s ease, border 0.3s ease;
}

.response-content h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--text-color-dark);
}

.response-content .message {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #555;
}

.response-content p {
    font-size: 1rem;
    color: var(--text-color-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

.response-content .back-button {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    text-decoration: none;
    color: white;
    background-color: var(--primary-color);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.response-content .back-button:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Success Subscription Styling */
.subscribe-mode {
    background-color: var(--success-bg);
    border: 1px solid #66c2ff;
}

.subscribe-mode h1 {
    color: var(--primary-color);
}

.subscribe-mode .back-button {
    background-color: var(--primary-color);
}

/* Unsubscription Styling */
.unsubscribe-mode {
    background-color: var(--danger-bg);
    border: 1px solid #ff8080;
}

.unsubscribe-mode h1 {
    color: #ff4d4d;
}

.unsubscribe-mode .back-button {
    background-color: #ff4d4d;
}

.unsubscribe-mode .back-button:hover {
    background-color: #ff3333;
}

/* Responsiveness */
@media (max-width: 768px) {
    .response-container {
        padding: 30px 15px;
    }

    .response-content h1 {
        font-size: 1.8rem;
    }

    .response-content .message {
        font-size: 1rem;
    }

    .response-content .back-button {
        font-size: 0.9rem;
        padding: 10px 25px;
    }
}

@media (max-width: 480px) {
    .response-container {
        padding: 20px 10px;
    }

    .response-content h1 {
        font-size: 1.5rem;
    }

    .response-content .message {
        font-size: 0.9rem;
    }

    .response-content .back-button {
        font-size: 0.85rem;
        padding: 8px 20px;
    }
}
