/* Notification styles */
.notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    max-width: 500px;
    width: 90%;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification.error {
    border-left: 4px solid #f44336;
}

.notification.success {
    border-left: 4px solid #4caf50;
}

.notification.warning {
    border-left: 4px solid #ff9800;
}

.notification-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.notification.error .notification-icon {
    color: #f44336;
}

.notification.success .notification-icon {
    color: #4caf50;
}

.notification.warning .notification-icon {
    color: #ff9800;
}

.notification-text {
    flex: 1;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.4;
}

.notification-close {
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

@media (prefers-color-scheme: dark) {
    .notification {
        background: var(--card-bg);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .notification-close:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Banner styles */
.banner {
    background: linear-gradient(135deg, rgba(77, 107, 254, 0.1) 0%, rgba(77, 107, 254, 0.05) 100%);
    border-bottom: 1px solid rgba(77, 107, 254, 0.2);
    padding: 0.75rem 1rem;
    margin-top: 64px;
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.banner-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.banner-text {
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
}

.banner-button {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.banner-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(77, 107, 254, 0.3);
}

@media (max-width: 768px) {
    .banner {
        padding: 0.75rem 0.5rem;
    }

    .banner-content {
        gap: 0.5rem;
    }

    .banner-text {
        font-size: 0.85rem;
        text-align: center;
        flex: 1 1 100%;
    }

    .banner-icon {
        width: 18px;
        height: 18px;
    }

    .banner-button {
        font-size: 0.85rem;
        padding: 0.35rem 0.85rem;
    }
}

.converter-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem;
}

.converter-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.converter-card h2 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.converter-card h2 svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary-color);
    fill: none;
    stroke-width: 2;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 200px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.5;
}

.form-hint {
    display: block;
    margin-top: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.form-hint a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.form-hint a:hover {
    text-decoration: underline;
}

.api-key-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.api-key-input-wrapper input {
    padding-right: 70px;
}

.api-key-input-wrapper input.highlight-required {
    border-color: #f44336;
    box-shadow: 0 0 0 1px #f44336;
    animation: pulse-border 1s infinite;
}

@keyframes pulse-border {
    0%, 100% {
        border-color: #f44336;
        box-shadow: 0 0 0 1px #f44336;
    }
    50% {
        border-color: #ff7875;
        box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.5);
    }
}

/* Hide browser's default password reveal icon */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-credentials-auto-fill-button {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
}

.toggle-visibility-btn,
.copy-api-key-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    height: 28px;
    width: 28px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toggle-visibility-btn:hover,
.copy-api-key-btn:hover {
    background: rgba(77, 107, 254, 0.1);
    color: var(--primary-color);
}

.toggle-visibility-btn {
    right: 36px;
}

.copy-api-key-btn {
    right: 4px;
}

.toggle-visibility-btn svg,
.copy-api-key-btn svg {
    width: 16px;
    height: 16px;
}

.copy-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    top: -30px;
    right: 0;
    white-space: nowrap;
    opacity: 0;
    animation: fadeInOut 1.5s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.checkbox-group input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.btn {
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

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

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: var(--card-bg);
}

.btn svg {
    width: 16px;
    height: 16px;
}

.button-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.quota-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.quota-info h3 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: var(--text-color);
}

.quota-details {
    display: flex;
    justify-content: space-around;
    margin-bottom: 0.75rem;
}

.quota-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quota-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.quota-value {
    font-weight: 600;
    font-size: 1rem;
}

.quota-remaining {
    color: var(--primary-color);
}

.quota-progress-container {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    margin: 0.75rem 0;
    overflow: hidden;
}

.quota-progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.expiration-info {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.expiration-label {
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.expiration-value {
    color: var(--text-color);
    font-weight: 500;
}

.quota-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}

.quota-actions .btn {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
}

.purchase-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

.feature-explanation {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .converter-container {
        padding: 1rem;
    }

    .converter-card {
        padding: 1.25rem;
    }

    .converter-card h2 {
        font-size: 1.1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

