:root {
    --primary-color: #3b82f6;
    --secondary-color: #1e40af;
    --button-color: #10b981;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Viga', sans-serif;
    background: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.subscription-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 480px;
}

.subscription-header {
    text-align: center;
    margin-bottom: 30px;
}

.subscription-header h1 {
    color: #4B2387;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 3px;
}

.subscription-header p {
    color: #4B2387;
    font-size: 16px;
}

.subscription-form {
    margin-bottom: 2px;
}

.form-group {
    margin-bottom: 2px;
}

label {
    display: block;
    margin-bottom: 2px;
    color: #4B2387;
    font-weight: 500;
    font-size: 14px;
}

.required {
    color: #ef4444;
}

input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.submit-btn {
    background: var(--button-color);
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background: var(--secondary-color);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Message container */
#message-container {
    margin-bottom: 3px;
    min-height: 3px;
}

.message {
    padding: 6px 8px;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 14px;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.message.info {
    display: block;
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.message.success {
    background-color: #d1fae5;
    color: #4B2387;
    border: 1px solid #a7f3d0;
    display: block;
}

.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: block;
}

.message.warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Domain information section */
.domain-info {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
    font-size: 14px;
}

.domain-info h4 {
    color: #374151;
    margin-bottom: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.domain-info ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.domain-info li {
    padding: 6px 0;
    color: #6b7280;
    padding-left: 24px;
    position: relative;
}

.domain-info li:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #9ca3af;
}

/* Domain examples */
.domain-examples {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #e5e7eb;
}

.domain-examples p {
    color: #374151;
    margin-bottom: 12px;
    font-weight: 500;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.example {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.example.good {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Enhanced email hint styles */
.email-hint {
    display: none;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 13px;
    border: 1px solid;
}

.email-hint.success {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.email-hint.warning {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.email-hint.error {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.email-hint i {
    margin-right: 6px;
}

/* Privacy note */
.privacy-note {
    text-align: center;
    color: #6b7280;
    font-size: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.privacy-note i {
    margin-right: 6px;
    color: var(--primary-color);
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 8px;
    color: #6b7280;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 300px;
    background-color: #374151;
    color: white;
    text-align: left;
    border-radius: 6px;
    padding: 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
    line-height: 1.5;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #374151 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.admin-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.admin-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.admin-link a:hover {
    text-decoration: underline;
}

/* Popup Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 10px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: slideUp 0.4s ease-out;
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.modal-icon.success {
    color: #4B2387;
}

.modal-icon.warning {
    color: #f59e0b;
}

.modal-icon.error {
    color: #ef4444;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #111827;
}

.modal-message {
    color: #6b7280;
    margin-bottom: 15px;
    line-height: 1.0;
}

.modal-close-btn {
    background: var(--button-color);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

.modal-close-btn:hover {
    background: var(--secondary-color);
}

/* Loading overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.loading-content {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.loading-content i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.loading-content p {
    color: #6b7280;
    font-size: 16px;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .subscription-container {
        padding: 6px 8px;
    }
    
    .subscription-header h1 {
        font-size: 20px;
    }
    
    .subscription-header p {
        font-size: 15px;
    }
    
    .example-grid {
        grid-template-columns: 1fr;
    }
    
    .tooltip .tooltiptext {
        width: 280px;
        margin-left: -140px;
    }
}

@media (max-width: 500px) {
    body {
        padding: 15px;
    }
    
    .subscription-container {
        padding: 12px 8px;
    }
    
    .subscription-header h1 {
        font-size: 20px;
    }
    
    .domain-info {
        padding: 15px;
    }
    
    .tooltip .tooltiptext {
        width: 250px;
        margin-left: -125px;
        font-size: 12px;
    }
}