/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    -webkit-animation-name: fadeIn; /* Fade in the background */
    -webkit-animation-duration: 0.4s;
    animation-name: fadeIn;
    animation-duration: 0.4s
}

/* Modal Content */
.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f3e8ff;
    padding: 20px;
    border: 1px solid #bda4e6;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.25), 0 4px 6px rgba(0,0,0,0.15);
    -webkit-animation-name: slideIn;
    -webkit-animation-duration: 0.4s;
    animation-name: slideIn;
    animation-duration: 0.4s;
    border-radius: 8px;
    color: #2d143c; /* Set text color for content inside modal */
    transition: transform 0.2s ease;
    transform-style: preserve-3d;
}

.modal-content::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(255,255,255,0.6), rgba(255,255,255,0));
    pointer-events: none;
}

/* Micro shake on hover */
.modal-content:hover {
    animation: card-wiggle 0.3s ease;
}

@keyframes card-wiggle {
    0%,100% { transform: translate(-50%, -50%) rotate(0deg); }
    25% { transform: translate(calc(-50% - 2px), calc(-50% - 2px)) rotate(-1deg); }
    75% { transform: translate(calc(-50% + 2px), calc(-50% + 2px)) rotate(1deg); }  
}

/* The Close Button */
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Add Animation */
@-webkit-keyframes slideIn {
    from {top: -300px; opacity: 0}
    to {top: 50%; opacity: 1}
}

@keyframes slideIn {
    from {top: -300px; opacity: 0}
    to {top: 50%; opacity: 1}
}

@-webkit-keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

@keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

#subscription-form {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
}

#subscription-form input {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#subscription-form button {
    background-color: #4CAF50; /* Green */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#subscription-form button:hover {
    background-color: #45a049;
}

#sub-message {
    margin-top: 10px;
    text-align: center;
    font-size: 0.9em;
}
