/* AI Metaphor Generator - Frontend Styles */

.aimg-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.aimg-form-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-bottom: 30px;
}

.aimg-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    text-align: center;
}

.aimg-description {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin: 0 0 30px 0;
    line-height: 1.6;
}

.aimg-form {
    margin-top: 30px;
}

.aimg-form-group {
    margin-bottom: 24px;
}

.aimg-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.aimg-form-group-half {
    flex: 1;
}

.aimg-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.aimg-required {
    color: #d63638;
}

.aimg-input,
.aimg-textarea,
.aimg-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.aimg-input:focus,
.aimg-textarea:focus,
.aimg-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.aimg-textarea {
    resize: vertical;
    min-height: 100px;
}

.aimg-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    appearance: none;
}

.aimg-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 180px;
}

.aimg-button-primary {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: #fff;
    width: 100%;
}

.aimg-button-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #135e96 0%, #0a4b78 100%);
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.3);
    transform: translateY(-1px);
}

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

.aimg-button-secondary {
    background: #f0f0f1;
    color: #1a1a1a;
    padding: 10px 20px;
    min-width: auto;
}

.aimg-button-secondary:hover {
    background: #dcdcde;
}

.aimg-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

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

.aimg-result {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
}

.aimg-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.aimg-result-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.aimg-output {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    background: #fff;
    padding: 24px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.aimg-output p {
    margin: 0 0 16px 0;
}

.aimg-output p:last-child {
    margin-bottom: 0;
}

.aimg-copy-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #2271b1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-align: center;
}

.aimg-copy-btn:hover {
    background: #135e96;
}

.aimg-copy-btn.aimg-copied {
    background: #00a32a;
}

.aimg-copy-btn.aimg-copied:hover {
    background: #008a20;
}

.aimg-error {
    margin-top: 20px;
    padding: 16px 20px;
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    border-radius: 4px;
    color: #721c24;
    font-size: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .aimg-form-wrapper {
        padding: 24px;
    }
    
    .aimg-title {
        font-size: 26px;
    }
    
    .aimg-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .aimg-form-group-half {
        margin-bottom: 24px;
    }
    
    .aimg-result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .aimg-copy-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .aimg-container {
        padding: 0 15px;
    }
    
    .aimg-form-wrapper {
        padding: 20px;
    }
    
    .aimg-title {
        font-size: 22px;
    }
    
    .aimg-output {
        font-size: 16px;
        padding: 20px;
    }
}

