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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
}

.help-link {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 14px;
    color: #667eea;
    text-decoration: none;
}

.help-link:hover {
    text-decoration: underline;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 8px;
    font-size: 24px;
}

.container > p {
    text-align: center;
    color: #666;
    margin-bottom: 24px;
    font-size: 14px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group button {
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.input-group button:hover {
    opacity: 0.9;
}

.input-group button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.status-box {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.status-box.hidden {
    display: none;
}

.status-box.error {
    background: #fee;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.status-box.success {
    background: #eafaf1;
    color: #27ae60;
    border: 1px solid #a9dfbf;
}

.status-box.loading {
    background: #eef6ff;
    color: #2980b9;
    border: 1px solid #bee5eb;
}

.status-box.info {
    background: #f8f9fa;
    color: #555;
    border: 1px solid #dee2e6;
}

.email-card {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 12px;
    border: 1px solid #e0e7ff;
    text-align: center;
}

.email-card.hidden {
    display: none;
}

.email-display {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.hint {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.5;
}

.fetch-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.fetch-btn:hover {
    opacity: 0.9;
}

.fetch-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.result-card {
    margin-top: 20px;
    padding: 20px;
    background: #eafaf1;
    border-radius: 12px;
    border: 1px solid #a9dfbf;
    text-align: center;
}

.result-card.hidden {
    display: none;
}

.result-header {
    font-size: 16px;
    font-weight: 600;
    color: #27ae60;
    margin-bottom: 12px;
}

.code-display {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: 4px;
    margin-bottom: 12px;
    font-family: "Courier New", monospace;
}

.mail-info {
    font-size: 12px;
    color: #888;
    margin-bottom: 16px;
}

.mail-info span {
    margin: 0 4px;
}

.copy-btn {
    padding: 8px 20px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.copy-btn:hover {
    opacity: 0.9;
}

.announcement-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.announcement-overlay.fade-out {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.announcement-modal {
    background: #fff;
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.announcement-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.announcement-text {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    white-space: pre-wrap;
    margin-bottom: 24px;
}

.announcement-confirm {
    padding: 10px 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.announcement-confirm:hover {
    opacity: 0.9;
}

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

@media (max-width: 500px) {
    .container {
        padding: 24px;
    }

    .code-display {
        font-size: 24px;
    }

    #announcement-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}
